HttpRequestMessage 构造函数

定义

初始化 HttpRequestMessage 类的新实例。

重载

HttpRequestMessage()

初始化 HttpRequestMessage 类的新实例。

HttpRequestMessage(HttpMethod, String)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。

HttpRequestMessage(HttpMethod, Uri)

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。

HttpRequestMessage()

Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs

初始化 HttpRequestMessage 类的新实例。

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

适用于

HttpRequestMessage(HttpMethod, String)

Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。

public:
 HttpRequestMessage(System::Net::Http::HttpMethod ^ method, System::String ^ requestUri);
public HttpRequestMessage (System.Net.Http.HttpMethod method, 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 方法。

requestUri
String

一个表示请求 Uri的字符串。

适用于

HttpRequestMessage(HttpMethod, Uri)

Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs
Source:
HttpRequestMessage.cs

初始化 HTTP 方法和请求 HttpRequestMessageUri 类的新实例。

public:
 HttpRequestMessage(System::Net::Http::HttpMethod ^ method, Uri ^ requestUri);
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 方法。

requestUri
Uri

要请求的 Uri

适用于