HttpResponseMessage.StatusCode 属性

定义

获取或设置 HTTP 响应的状态代码。

public:
 property HttpStatusCode StatusCode { HttpStatusCode get(); void set(HttpStatusCode value); };
HttpStatusCode StatusCode();

void StatusCode(HttpStatusCode value);
public HttpStatusCode StatusCode { get; set; }
var httpStatusCode = httpResponseMessage.statusCode;
httpResponseMessage.statusCode = httpStatusCode;
Public Property StatusCode As HttpStatusCode

属性值

HTTP 响应的状态代码。

适用于

另请参阅