HttpWebRequest Constructeurs

Définition

Initialise une nouvelle instance de la classe HttpWebRequest. Ces constructeurs sont obsolètes. Pour plus d’informations, consultez la section Remarques.

Surcharges

HttpWebRequest()
Obsolète.
Obsolète.

Initialise une nouvelle instance de la classe HttpWebRequest. Ce constructeur est obsolète.

HttpWebRequest(Uri)
HttpWebRequest(SerializationInfo, StreamingContext)
Obsolète.
Obsolète.
Obsolète.
Obsolète.
Obsolète.

Initialise une nouvelle instance de la classe HttpWebRequest à partir des instances spécifiées des classes SerializationInfo et StreamingContext. Ce constructeur est obsolète.

Remarques

Les deux HttpWebRequest constructeurs sont obsolètes et ne doivent pas être utilisés. Appelez la WebRequest.CreateHttp méthode pour initialiser de nouveaux HttpWebRequest objets.

HttpWebRequest()

Attention

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Attention

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Initialise une nouvelle instance de la classe HttpWebRequest. Ce constructeur est obsolète.

public:
 HttpWebRequest();
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public HttpWebRequest ();
Public Sub New ()
Attributs

S’applique à

HttpWebRequest(Uri)

public:
 HttpWebRequest(Uri ^ uri);
public HttpWebRequest (Uri uri);
new System.Net.HttpWebRequest : Uri -> System.Net.HttpWebRequest
Public Sub New (uri As Uri)

Paramètres

uri
Uri

S’applique à

HttpWebRequest(SerializationInfo, StreamingContext)

Attention

Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202

Attention

WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}

Attention

WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}

Attention

Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202

Attention

Serialization is obsoleted for this type

Initialise une nouvelle instance de la classe HttpWebRequest à partir des instances spécifiées des classes SerializationInfo et StreamingContext. Ce constructeur est obsolète.

protected:
 HttpWebRequest(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
[System.Obsolete("Serialization is obsoleted for this type.  https://go.microsoft.com/fwlink/?linkid=14202")]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("Serialization is obsoleted for this type.  http://go.microsoft.com/fwlink/?linkid=14202")]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("Serialization is obsoleted for this type", false)]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[<System.Obsolete("Serialization is obsoleted for this type.  https://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
[<System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
[<System.Obsolete("WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.", DiagnosticId="SYSLIB0014", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
[<System.Obsolete("Serialization is obsoleted for this type.  http://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
[<System.Obsolete("Serialization is obsoleted for this type", false)>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

Paramètres

serializationInfo
SerializationInfo

Objet SerializationInfo qui contient les informations requises pour sérialiser le nouvel objet HttpWebRequest.

streamingContext
StreamingContext

Objet StreamingContext qui contient la source et la destination du flux sérialisé associé au nouvel objet HttpWebRequest.

Attributs

Remarques

Une application doit s’exécuter en mode confiance totale lors de l’utilisation de la sérialisation.

Voir aussi

S’applique à