Compartir vía


HttpWebRequest Constructores

Definición

Inicializa una nueva instancia de la clase HttpWebRequest. Estos constructores están obsoletos; consulte la sección Comentarios para obtener más información.

Sobrecargas

HttpWebRequest()
Obsoletos.
Obsoletos.

Inicializa una nueva instancia de la clase HttpWebRequest. Este constructor está obsoleto.

HttpWebRequest(SerializationInfo, StreamingContext)
Obsoletos.
Obsoletos.
Obsoletos.
Obsoletos.

Inicializa una nueva instancia de la clase HttpWebRequest a partir de las instancias especificadas de las clases SerializationInfo y StreamingContext especificadas. Este constructor está obsoleto.

Comentarios

Cautela

WebRequest, HttpWebRequest, ServicePointy WebClient están obsoletos y no debe usarlos para el nuevo desarrollo. Use HttpClient en su lugar.

Ambos constructores HttpWebRequest están obsoletos y no se deben usar. Llame al método WebRequest.CreateHttp para inicializar nuevos objetos HttpWebRequest.

HttpWebRequest()

Precaución

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

Precaución

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

Inicializa una nueva instancia de la clase HttpWebRequest. Este constructor está obsoleto.

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

Se aplica a

HttpWebRequest(SerializationInfo, StreamingContext)

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

Precaución

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

Precaución

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

Precaución

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

Precaución

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

Inicializa una nueva instancia de la clase HttpWebRequest a partir de las instancias especificadas de las clases SerializationInfo y StreamingContext especificadas. Este constructor está obsoleto.

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)

Parámetros

serializationInfo
SerializationInfo

Objeto SerializationInfo que contiene la información necesaria para serializar el nuevo objeto HttpWebRequest.

streamingContext
StreamingContext

Objeto StreamingContext que contiene el origen y el destino de la secuencia serializada asociada al nuevo objeto HttpWebRequest.

Atributos

Comentarios

Una aplicación debe ejecutarse en modo de plena confianza al usar la serialización.

Consulte también

  • de serialización XML y SOAP

Se aplica a