MSDN Documentation

System.Net.Http.HttpStatusCode Enumeration

Provides a set of enumerated constants that are used to represent HTTP status codes. These values are defined in RFC 2616, Hypertext Transfer Protocol -- HTTP/1.1.

Namespace:

System.Net.Http

Assembly:

System.Net.Http.dll

Syntax:

public enum HttpStatusCode

Remarks:

The HttpStatusCode enumeration contains values that represent the three-digit HTTP status codes defined by the HTTP protocol. These codes indicate the result of an HTTP request. For example, a status code of 200 (OK) indicates that the request was successful, while a status code of 404 (Not Found) indicates that the requested resource could not be found.

You can use the HttpStatusCode enumeration with the HttpResponseMessage.StatusCode property to set or retrieve the status code of an HTTP response.

Members: