HttpRequestMessage 构造函数

定义

初始化 HttpRequestMessage 类的新实例。Initializes a new instance of the HttpRequestMessage class.

重载

HttpRequestMessage()

初始化 HttpRequestMessage 类的新实例。Initializes a new instance of the HttpRequestMessage class.

HttpRequestMessage(HttpMethod, String)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

HttpRequestMessage(HttpMethod, Uri)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

HttpRequestMessage()

初始化 HttpRequestMessage 类的新实例。Initializes a new instance of the HttpRequestMessage class.

public:
 HttpRequestMessage();
public HttpRequestMessage ();
Public Sub New ()

HttpRequestMessage(HttpMethod, String)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

public:
 HttpRequestMessage(System::Net::Http::HttpMethod ^ method, System::String ^ requestUri);
public HttpRequestMessage (System.Net.Http.HttpMethod method, string requestUri);
new System.Net.Http.HttpRequestMessage : System.Net.Http.HttpMethod * string -> System.Net.Http.HttpRequestMessage
Public Sub New (method As HttpMethod, requestUri As String)

参数

method
HttpMethod

HTTP 方法。The HTTP method.

requestUri
String

表示请求 Uri 的字符串。A string that represents the request Uri.

HttpRequestMessage(HttpMethod, Uri)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。Initializes a new instance of the HttpRequestMessage class with an HTTP method and a request Uri.

public:
 HttpRequestMessage(System::Net::Http::HttpMethod ^ method, Uri ^ requestUri);
public HttpRequestMessage (System.Net.Http.HttpMethod method, Uri requestUri);
new System.Net.Http.HttpRequestMessage : System.Net.Http.HttpMethod * Uri -> System.Net.Http.HttpRequestMessage
Public Sub New (method As HttpMethod, requestUri As Uri)

参数

method
HttpMethod

HTTP 方法。The HTTP method.

requestUri
Uri

要请求的 UriThe Uri to request.

适用于