HttpWebRequest Konstruktory
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy HttpWebRequest. Te konstruktory są przestarzałe; zobacz sekcję Uwagi, aby uzyskać szczegółowe informacje.
Przeciążenia
| Nazwa | Opis |
|---|---|
| HttpWebRequest() |
Przestarzałe.
Przestarzałe.
Inicjuje nowe wystąpienie klasy HttpWebRequest. Ten konstruktor jest przestarzały. |
| HttpWebRequest(SerializationInfo, StreamingContext) |
Przestarzałe.
Przestarzałe.
Przestarzałe.
Przestarzałe.
Inicjuje nowe wystąpienie HttpWebRequest klasy z określonych wystąpień SerializationInfo klas i StreamingContext . Ten konstruktor jest przestarzały. |
Uwagi
Caution
WebRequest, , HttpWebRequestServicePointi WebClient są przestarzałe i nie należy ich używać do tworzenia nowych aplikacji. Użyj HttpClient zamiast tego.
Oba HttpWebRequest konstruktory są przestarzałe i nie powinny być używane. Wywołaj metodę , WebRequest.CreateHttp aby zainicjować nowe HttpWebRequest obiekty.
HttpWebRequest()
Uwaga
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Uwaga
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Inicjuje nowe wystąpienie klasy HttpWebRequest. Ten konstruktor jest przestarzały.
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 ()
- Atrybuty
Dotyczy
HttpWebRequest(SerializationInfo, StreamingContext)
- Źródło:
- HttpWebRequest.cs
- Źródło:
- HttpWebRequest.cs
- Źródło:
- HttpWebRequest.cs
- Źródło:
- HttpWebRequest.cs
- Źródło:
- HttpWebRequest.cs
Uwaga
WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.
Uwaga
Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202
Uwaga
WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead
Uwaga
Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202
Inicjuje nowe wystąpienie HttpWebRequest klasy z określonych wystąpień SerializationInfo klas i StreamingContext . Ten konstruktor jest przestarzały.
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. 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("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("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. 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("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
SerializationInfo Obiekt zawierający informacje wymagane do serializacji nowego HttpWebRequest obiektu.
- streamingContext
- StreamingContext
StreamingContext Obiekt, który zawiera źródło i miejsce docelowe serializowanego strumienia skojarzonego z nowym HttpWebRequest obiektem.
- Atrybuty
Uwagi
Aplikacja musi działać w trybie pełnego zaufania podczas korzystania z serializacji.