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:
- Continue (100)
- SwitchingProtocols (101)
- OK (200)
- Created (201)
- Accepted (202)
- NonAuthoritativeInformation (203)
- NoContent (204)
- ResetContent (205)
- PartialContent (206)
- MultipleChoices (300)
- MovedPermanently (301)
- Found (302)
- SeeOther (303)
- NotModified (304)
- UseProxy (305)
- Unused (306)
- TemporaryRedirect (307)
- BadRequest (400)
- Unauthorized (401)
- PaymentRequired (402)
- Forbidden (403)
- NotFound (404)
- MethodNotAllowed (405)
- NotAcceptable (406)
- ProxyAuthenticationRequired (407)
- RequestTimeout (408)
- Conflict (409)
- Gone (410)
- LengthRequired (411)
- PreconditionFailed (412)
- RequestEntityTooLarge (413)
- RequestUriTooLong (414)
- UnsupportedMediaType (415)
- RequestedRangeNotSatisfiable (416)
- ExpectationFailed (417)
- InternalServerError (500)
- NotImplemented (501)
- BadGateway (502)
- ServiceUnavailable (503)
- GatewayTimeout (504)
- HttpVersionNotSupported (505)