Partager via


HttpWebRequest Constructeurs

Définition

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

Surcharges

HttpWebRequest()
Obsolète.
Obsolète.

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

HttpWebRequest(SerializationInfo, StreamingContext)
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

Prudence

WebRequest, HttpWebRequest, ServicePointet WebClient sont obsolètes et vous ne devez pas les utiliser pour le nouveau développement. Utilisez HttpClient à la place.

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

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 ();
[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(SerializationInfo, StreamingContext)

Source:
HttpWebRequest.cs
Source:
HttpWebRequest.cs
Source:
HttpWebRequest.cs

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

Attention

WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.

Attention

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

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.  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
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

  • de sérialisation XML et SOAP

S’applique à