HttpWebRequest 构造函数
定义
初始化 HttpWebRequest 类的新实例。Initializes a new instance of the HttpWebRequest class. 这些构造函数已过时;请参阅“备注”部分,了解详细信息。These constructors are obsolete; see the Remarks section for details.
重载
| HttpWebRequest() |
已过时。
已过时。
初始化 HttpWebRequest 类的新实例。Initializes a new instance of the HttpWebRequest class. 此构造函数已过时。This constructor is obsolete. |
| HttpWebRequest(Uri) | |
| 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. |
注解
这两个 HttpWebRequest 构造函数已过时,不应使用。Both HttpWebRequest constructors are obsolete and should not be used. 调用 WebRequest.CreateHttp 方法以初始化新 HttpWebRequest 对象。Call the WebRequest.CreateHttp method to initialize new HttpWebRequest objects.
HttpWebRequest()
注意
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
注意
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
初始化 HttpWebRequest 类的新实例。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)]
[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)
public:
HttpWebRequest(Uri ^ uri);
public HttpWebRequest (Uri uri);
new System.Net.HttpWebRequest : Uri -> System.Net.HttpWebRequest
Public Sub New (uri As Uri)
参数
- uri
- Uri
适用于
HttpWebRequest(SerializationInfo, StreamingContext)
注意
Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202
注意
Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202
注意
Serialization is obsoleted for this type
从 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.
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);
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", false)]
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
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
[<System.Obsolete("Serialization is obsoleted for this type", false)>]
new System.Net.HttpWebRequest : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.HttpWebRequest
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
参数
- serializationInfo
- SerializationInfo
包含序列化新 HttpWebRequest 对象所需信息的 SerializationInfo 对象。A SerializationInfo object that contains the information required to serialize the new HttpWebRequest object.
- streamingContext
- StreamingContext
包含与新 HttpWebRequest 对象关联的序列化流的源和目标的 StreamingContext 对象。A StreamingContext object that contains the source and destination of the serialized stream associated with the new HttpWebRequest object.
- 属性
注解
使用序列化时,应用程序必须在完全信任模式下运行。An application must run in full trust mode when using serialization.