HttpWebRequest Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginisialisasi instans baru kelas HttpWebRequest. Konstruktor ini usang; lihat bagian Keterangan untuk detailnya.
Overload
HttpWebRequest() |
Kedaluwarsa.
Kedaluwarsa.
Menginisialisasi instans baru kelas HttpWebRequest. Konstruktor ini sudah usang. |
HttpWebRequest(SerializationInfo, StreamingContext) |
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.
Menginisialisasi instans baru kelas HttpWebRequest dari instans yang ditentukan dari kelas SerializationInfo dan StreamingContext. Konstruktor ini sudah usang. |
Keterangan
Hati
WebRequest
, HttpWebRequest
, ServicePoint
, dan WebClient
usang, dan Anda tidak boleh menggunakannya untuk pengembangan baru. Gunakan HttpClient sebagai gantinya.
Kedua konstruktor HttpWebRequest usang dan tidak boleh digunakan. Panggil metode WebRequest.CreateHttp untuk menginisialisasi objek HttpWebRequest baru.
HttpWebRequest()
Perhatian
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Perhatian
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Menginisialisasi instans baru kelas HttpWebRequest. Konstruktor ini sudah usang.
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 ()
- Atribut
Berlaku untuk
HttpWebRequest(SerializationInfo, StreamingContext)
- Sumber:
- HttpWebRequest.cs
- Sumber:
- HttpWebRequest.cs
- Sumber:
- HttpWebRequest.cs
Perhatian
Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202
Perhatian
WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead
Perhatian
WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead.
Perhatian
Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202
Menginisialisasi instans baru kelas HttpWebRequest dari instans yang ditentukan dari kelas SerializationInfo dan StreamingContext. Konstruktor ini sudah usang.
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)
Parameter
- serializationInfo
- SerializationInfo
Objek SerializationInfo yang berisi informasi yang diperlukan untuk membuat serialisasi objek HttpWebRequest baru.
- streamingContext
- StreamingContext
Objek StreamingContext yang berisi sumber dan tujuan aliran berseri yang terkait dengan objek HttpWebRequest baru.
- Atribut
Keterangan
Aplikasi harus berjalan dalam mode kepercayaan penuh saat menggunakan serialisasi.
Lihat juga
- Serialisasi XML dan SOAP