Sdílet prostřednictvím


HttpWebRequest Konstruktory

Definice

Inicializuje novou instanci HttpWebRequest třídy. Tyto konstruktory jsou zastaralé; Podrobnosti najdete v části Poznámky.

Přetížení

HttpWebRequest()
Zastaralé.
Zastaralé.

Inicializuje novou instanci HttpWebRequest třídy. Tento konstruktor je zastaralý.

HttpWebRequest(SerializationInfo, StreamingContext)
Zastaralé.
Zastaralé.
Zastaralé.
Zastaralé.

Inicializuje novou instanci třídy HttpWebRequest ze zadaných instancí SerializationInfo a StreamingContext třídy. Tento konstruktor je zastaralý.

Poznámky

Opatrnost

WebRequest, HttpWebRequest, ServicePointa WebClient jsou zastaralé a neměli byste je používat pro nový vývoj. Místo toho použijte HttpClient.

Oba HttpWebRequest konstruktory jsou zastaralé a neměly by se používat. Volání WebRequest.CreateHttp metoda inicializace nových HttpWebRequest objektů.

HttpWebRequest()

Upozornění

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

Upozornění

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

Inicializuje novou instanci HttpWebRequest třídy. Tento konstruktor je zastaralý.

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 ()
Atributy

Platí pro

HttpWebRequest(SerializationInfo, StreamingContext)

Zdroj:
HttpWebRequest.cs
Zdroj:
HttpWebRequest.cs
Zdroj:
HttpWebRequest.cs

Upozornění

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

Upozornění

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

Upozornění

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

Upozornění

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

Inicializuje novou instanci třídy HttpWebRequest ze zadaných instancí SerializationInfo a StreamingContext třídy. Tento konstruktor je zastaralý.

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)

Parametry

serializationInfo
SerializationInfo

Objekt SerializationInfo obsahující informace potřebné k serializaci nového objektu HttpWebRequest.

streamingContext
StreamingContext

Objekt StreamingContext, který obsahuje zdroj a cíl serializovaného datového proudu přidruženého k novému objektu HttpWebRequest.

Atributy

Poznámky

Při použití serializace musí aplikace běžet v režimu úplného vztahu důvěryhodnosti.

Viz také

Platí pro