HttpResponseMessage 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 HttpResponseMessage 类的新实例。
重载
HttpResponseMessage() |
初始化 HttpResponseMessage 类的新实例。 |
HttpResponseMessage(HttpStatusCode) |
初始化指定的 HttpResponseMessage 的 StatusCode 类的新实例。 |
注解
获取 HttpResponseMessage 的常见方法是从方法之 HttpClient.SendAsync(HttpRequestMessage) 一获取 。
HttpResponseMessage()
- Source:
- HttpResponseMessage.cs
- Source:
- HttpResponseMessage.cs
- Source:
- HttpResponseMessage.cs
初始化 HttpResponseMessage 类的新实例。
public:
HttpResponseMessage();
public HttpResponseMessage ();
Public Sub New ()
适用于
HttpResponseMessage(HttpStatusCode)
- Source:
- HttpResponseMessage.cs
- Source:
- HttpResponseMessage.cs
- Source:
- HttpResponseMessage.cs
初始化指定的 HttpResponseMessage 的 StatusCode 类的新实例。
public:
HttpResponseMessage(System::Net::HttpStatusCode statusCode);
public HttpResponseMessage (System.Net.HttpStatusCode statusCode);
new System.Net.Http.HttpResponseMessage : System.Net.HttpStatusCode -> System.Net.Http.HttpResponseMessage
Public Sub New (statusCode As HttpStatusCode)
参数
- statusCode
- HttpStatusCode
HTTP 响应的状态代码。