StatusCode provides an enumeration over common HTTP status codes.
Enumerator |
---|
SC_CONTINUE |
Represents HTTP status code 100. The client may continue the request.
|
SC_SWITCHING_PROTOCOLS |
Represents HTTP status code 101. Responds to an Upgrade header. The server will switch protocols to the protocol requested in the Upgrade header immediately after sending the response.
|
SC_OK |
Represents HTTP status code 200. The request succeeded.
|
SC_CREATED |
Represents HTTP status code 201. The request succeeded and created a new resource on the server.
|
SC_ACCEPTED |
Represents HTTP status code 202. Indicates that the request is accepted for processing and that the processing has not been completed. For example, a server accepting a request to add a directory to a nightly backup job might use 202 to indicate that the request is acceptable, but that the backup has not yet run.
|
SC_NON_AUTHORITATIVE_INFORMATION |
Represents HTTP status code 203. The request succeeded with no errors. The metainformation included may not be the information provided from the original server. For example, the metainformation may be from a cached copy, or the server may have added additional information.
|
SC_NO_CONTENT |
Represents HTTP status code 204. The request succeeded, but created no new information.
|
SC_RESET_CONTENT |
Represents HTTP status code 205. The client should refresh the document view from which the request originated.
|
SC_PARTIAL_CONTENT |
Represents HTTP status code 206. Response to a partial GET . The response contains the range requested.
|
SC_MULTIPLE_CHOICES |
Represents HTTP status code 300. The requested resource corresponds to any one of a set of representations, each with its own specific location. The server may provide a URI to the preferred location in the Location header of the response.
|
SC_MOVED_PERMANENTLY |
Represents HTTP status code 301. The resource has permanently moved to a new location. The server should provide a URI to the new location in the Location header of the response. The client should use the new URI for future requests.
|
SC_MOVED_TEMPORARILY |
Represents HTTP status code 302. The resource has temporarily moved to a new location. The server should provide a URI to the new location in the Location header of the response. The client should use the original URI for future requests.
|
SC_SEE_OTHER |
Represents HTTP status code 303. The resource is located at a different URI. The server should provide a URI to the new location in the Location header of the response.
|
SC_NOT_MODIFIED |
Represents HTTP status code 304. Response to a conditional GET . The resource is available but does not need to be retransmitted.
|
SC_USE_PROXY |
Represents HTTP status code 305. The resource is only available through a proxy. The URI of the resource on the proxy must be provided in the Location header in the response.
|
SC_BAD_REQUEST |
Represents HTTP status code 400. The request was syntactically incorrect.
|
SC_UNAUTHORIZED |
Represents HTTP status code 401. The server requires HTTP authentication for the client to access the resource. The server must include a WWW-Authenticate header in the response.
|
SC_PAYMENT_REQUIRED |
Represents HTTP status code 402. Reserved for future use.
|
SC_FORBIDDEN |
Represents HTTP status code 403. The server refuses to fulfill the request. This code should only be used for permanent conditions. If the client lacks permission to execute the request, the server should return SC_UNAUTHORIZED (status code 401).
|
SC_NOT_FOUND |
Represents HTTP status code 404. The server has no resource that matches the request.
|
SC_METHOD_NOT_ALLOWED |
Represents HTTP status code 405. The server does not allow the method requested for the resource requested. For example, a server may return this code in response to an attempt to POST data to a static web page.
|
SC_NOT_ACCEPTABLE |
Represents HTTP status code 406. The resource cannot generate a response that meets the requirements of the Accept headers in the request.
|
SC_PROXY_AUTHENTICATION_REQUIRED |
Represents HTTP status code 407. The client must authenticate itself with the proxy. A response with this status must include a Proxy-Authenticate header field with a challenge for the requested resource.
|
SC_REQUEST_TIMEOUT |
Represents HTTP status code 408. The server timed out the request.
|
SC_CONFLICT |
Represents HTTP status code 409. The server could not complete the request due to a conflict between the request and the current state of the resource.
|
SC_GONE |
Represents HTTP status code 410. The resource is not available and the server has no other address for the resource. This code should only be used for permanent conditions.
|
SC_LENGTH_REQUIRED |
Represents HTTP status code 411. The server requires a Content-Length header to fulfill the request.
|
SC_PRECONDITION_FAILED |
Represents HTTP status code 412. At least one of the preconditions in the request evaluated to false when it was tested on the server. The request was not executed.
|
SC_REQUEST_ENTITY_TOO_LARGE |
Represents HTTP status code 413. The request is larger than the server allows.
|
SC_REQUEST_URI_TOO_LONG |
Represents HTTP status code 414. The URI in the request is longer than the server allows.
|
SC_UNSUPPORTED_MEDIA_TYPE |
Represents HTTP status code 415. The server cannot process the request because the entity of the request is in a format not supported by the requested resource for the requested method.
|
SC_REQUESTED_RANGE_NOT_SATISFIABLE |
Represents HTTP status code 416. The byte range requested is not available in the resource.
|
SC_EXPECTATION_FAILED |
Represents HTTP status code 417. The server could not comply with the expectation stated in the Expect header of the request.
|
SC_INTERNAL_SERVER_ERROR |
Represents HTTP status code 500. The server could not fulfill the request due to an error inside the HTTP server. This code is typically used for errors that do not fit into other categories, such as a CGI program failing to execute.
|
SC_NOT_IMPLEMENTED |
Represents HTTP status code 501. The server does not support the request method.
|
SC_BAD_GATEWAY |
Represents HTTP status code 502. The server is acting as a gateway or proxy and received an invalid response from another server.
|
SC_SERVICE_UNAVAILABLE |
Represents HTTP status code 503. The server is temporarily unable to handle the request. The server may include a suggested time for the client to wait before resending the request in the Retry-After header of the response.
|
SC_GATEWAY_TIMEOUT |
Represents HTTP status code 504. The server is acting as a gateway or proxy and did not receive a timely response from another server.
|
SC_HTTP_VERSION_NOT_SUPPORTED |
Represents HTTP status code 505. The server does not support or refuses to support the HTTP protocol version that was used in the request.
|