Compartilhar via


HttpWebRequest Construtores

Definição

Inicializa uma nova instância da classe HttpWebRequest. Esses construtores são obsoletos; consulte a seção Comentários para obter detalhes.

Sobrecargas

HttpWebRequest()
Obsoleto.
Obsoleto.

Inicializa uma nova instância da classe HttpWebRequest. Este construtor é obsoleto.

HttpWebRequest(SerializationInfo, StreamingContext)
Obsoleto.
Obsoleto.
Obsoleto.
Obsoleto.

Inicializa uma nova instância da classe HttpWebRequest das instâncias especificadas das classes SerializationInfo e StreamingContext. Este construtor é obsoleto.

Comentários

Cuidado

WebRequest, HttpWebRequest, ServicePointe WebClient estão obsoletos e você não deve usá-los para um novo desenvolvimento. Em vez disso, use HttpClient.

Ambos HttpWebRequest construtores são obsoletos e não devem ser usados. Chame o método WebRequest.CreateHttp para inicializar novos objetos HttpWebRequest.

HttpWebRequest()

Cuidado

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

Cuidado

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

Inicializa uma nova instância da classe HttpWebRequest. Este construtor é 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

Aplica-se a

HttpWebRequest(SerializationInfo, StreamingContext)

Origem:
HttpWebRequest.cs
Origem:
HttpWebRequest.cs
Origem:
HttpWebRequest.cs

Cuidado

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

Cuidado

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

Cuidado

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

Cuidado

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

Inicializa uma nova instância da classe HttpWebRequest das instâncias especificadas das classes SerializationInfo e StreamingContext. Este construtor é 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

Um objeto SerializationInfo que contém as informações necessárias para serializar o novo objeto HttpWebRequest.

streamingContext
StreamingContext

Um objeto StreamingContext que contém a origem e o destino do fluxo serializado associado ao novo objeto HttpWebRequest.

Atributos

Comentários

Um aplicativo deve ser executado no modo de confiança total ao usar a serialização.

Confira também

  • de serialização XML e SOAP

Aplica-se a