HttpWebRequest HttpWebRequest HttpWebRequest HttpWebRequest Constructors

Definition

Overloads

HttpWebRequest() HttpWebRequest() HttpWebRequest()

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

HttpWebRequest(Uri) HttpWebRequest(Uri) HttpWebRequest(Uri)
HttpWebRequest(SerializationInfo, StreamingContext) HttpWebRequest(SerializationInfo, StreamingContext) 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() HttpWebRequest() 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 ()

HttpWebRequest(Uri) HttpWebRequest(Uri) HttpWebRequest(Uri)

public:
 HttpWebRequest(Uri ^ uri);
public HttpWebRequest (Uri uri);
new System.Net.HttpWebRequest : Uri -> System.Net.HttpWebRequest

Parameters

uri
Uri Uri Uri Uri

HttpWebRequest(SerializationInfo, StreamingContext) HttpWebRequest(SerializationInfo, StreamingContext) 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", false)]
[System.Obsolete("Serialization is obsoleted for this type.  http://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);
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest

Parameters

serializationInfo
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

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

streamingContext
StreamingContext StreamingContext StreamingContext StreamingContext

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

Remarks

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

Security

WebPermission
for unrestricted access to network resources. Associated enumeration: Unrestricted

See also

Applies to