HttpWebRequest Constructors

Definition

Initializes a new instance of the HttpWebRequest class. These constructors are obsolete; see the Remarks section for details.

Overloads

HttpWebRequest()

Initializes a new instance of the HttpWebRequest class. This constructor is obsolete.

HttpWebRequest(Uri)
HttpWebRequest(SerializationInfo, StreamingContext)

Initializes a new instance of the HttpWebRequest class from the specified instances of the SerializationInfo and StreamingContext classes. This constructor is obsolete.

Remarks

Both HttpWebRequest constructors are obsolete and should not be used. Call the WebRequest.CreateHttp method to initialize new HttpWebRequest objects.

HttpWebRequest()

Warning

This API is now obsolete.

Initializes a new instance of the HttpWebRequest class. This constructor is obsolete.

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

HttpWebRequest(Uri)

public:
 HttpWebRequest(Uri ^ uri);
public HttpWebRequest (Uri uri);
new System.Net.HttpWebRequest : Uri -> System.Net.HttpWebRequest
Public Sub New (uri As Uri)

Parameters

uri
Uri

HttpWebRequest(SerializationInfo, StreamingContext)

Warning

This API is now obsolete.

Initializes a new instance of the HttpWebRequest class from the specified instances of the SerializationInfo and StreamingContext classes. This constructor is obsolete.

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("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);
[System.Obsolete("Serialization is obsoleted for this type.  https://go.microsoft.com/fwlink/?linkid=14202")]
[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);
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("Serialization is obsoleted for this type", false)]
protected HttpWebRequest (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

Parameters

serializationInfo
SerializationInfo

A SerializationInfo object that contains the information required to serialize the new HttpWebRequest object.

streamingContext
StreamingContext

A StreamingContext object that contains the source and destination of the serialized stream associated with the new HttpWebRequest object.

Attributes

Remarks

An application must run in full trust mode when using serialization.

See also

Applies to