HttpStatusCode HttpStatusCode HttpStatusCode HttpStatusCode HttpStatusCode Enum

Definition

Contains the values of status codes defined for HTTP in the response to an HTTP request.

public : enum class HttpStatusCode
enum class winrt::Windows::Web::Http::HttpStatusCode : int32_t
public enum HttpStatusCode
Public Enum HttpStatusCode
var value = Windows.Web.Http.HttpStatusCode.accepted;
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Fields

Accepted Accepted Accepted Accepted Accepted 202

The request has been accepted for further processing.

AlreadyReported AlreadyReported AlreadyReported AlreadyReported AlreadyReported 208

Some of the results of the requested operation were already reported.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). It can only be returned if the client HTTP request included the DAV header in the request. This status code is documented in IETF RFC 5842.

BadGateway BadGateway BadGateway BadGateway BadGateway 502

An intermediate proxy server received a bad response from another proxy or the origin server.

BadRequest BadRequest BadRequest BadRequest BadRequest 400

The request could not be understood by the server. This status code is sent when no other error is applicable, or if the exact error is unknown or does not have its own error code.

Conflict Conflict Conflict Conflict Conflict 409

The request could not be carried out because of a conflict on the server.

Continue Continue Continue Continue Continue 100

The client should continue with its request.

Created Created Created Created Created 201

The request resulted in a new resource created before the response was sent.

ExpectationFailed ExpectationFailed ExpectationFailed ExpectationFailed ExpectationFailed 417

An expectation given in an Expect header could not be met by the server.

FailedDependency FailedDependency FailedDependency FailedDependency FailedDependency 424

The method could not be performed on the resource because the requested action depended on another action and that action failed.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). This status code is documented in IETF RFC 4918.

Forbidden Forbidden Forbidden Forbidden Forbidden 403

The server refuses to fulfill the request.

Found Found Found Found Found 302

The requested information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will use the GET method.

GatewayTimeout GatewayTimeout GatewayTimeout GatewayTimeout GatewayTimeout 504

An intermediate proxy server timed out while waiting for a response from another proxy or the origin server.

Gone Gone Gone Gone Gone 410

The requested resource is no longer available.

HttpVersionNotSupported HttpVersionNotSupported HttpVersionNotSupported HttpVersionNotSupported HttpVersionNotSupported 505

The requested HTTP version is not supported by the server.

IMUsed IMUsed IMUsed IMUsed IMUsed 226

The server has fulfilled a GET request for the resource and the response is the result of one or more actions applied to the current instance.

This status code is documented in IETF RFC 3229.

InsufficientStorage InsufficientStorage InsufficientStorage InsufficientStorage InsufficientStorage 507

The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). This status code is documented in IETF RFC 4918.

InternalServerError InternalServerError InternalServerError InternalServerError InternalServerError 500

A generic error has occurred on the server.

LengthRequired LengthRequired LengthRequired LengthRequired LengthRequired 411

The required Content-Length header is missing.

Locked Locked Locked Locked Locked 423

The source or destination resource of a method is locked. This response should contain an appropriate precondition or post-condition code.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). This status code is documented in IETF RFC 4918.

LoopDetected LoopDetected LoopDetected LoopDetected LoopDetected 508

The server terminated an operation because it encountered an infinite loop while processing a request. This status indicates that the entire operation failed.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). It can only be returned if the client HTTP request included the DAV header in the request. This status code is documented in IETF RFC 5842.

MethodNotAllowed MethodNotAllowed MethodNotAllowed MethodNotAllowed MethodNotAllowed 405

The HTTP method in the request is not allowed on the requested resource.

MovedPermanently MovedPermanently MovedPermanently MovedPermanently MovedPermanently 301

The requested information has been moved to the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response.

MultipleChoices MultipleChoices MultipleChoices MultipleChoices MultipleChoices 300

The requested information has multiple representations. The default action is to treat this status as a redirect and follow the contents of the Location header associated with this response.

MultiStatus MultiStatus MultiStatus MultiStatus MultiStatus 207

The response provides status for multiple independent operations. Specific error messages appear in the body of the multi- status response.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). This status code is documented in IETF RFC 4918.

NetworkAuthenticationRequired NetworkAuthenticationRequired NetworkAuthenticationRequired NetworkAuthenticationRequired NetworkAuthenticationRequired 511

The server indicates that the client needs to authenticate to gain network access. The response should contain a link to a resource that allows the user to submit credentials.

This status code is documented in IETF RFC 6585.

NoContent NoContent NoContent NoContent NoContent 204

The request has been successfully processed and that the response is intentionally blank.

NonAuthoritativeInformation NonAuthoritativeInformation NonAuthoritativeInformation NonAuthoritativeInformation NonAuthoritativeInformation 203

The returned meta-information is from a cached copy instead of the origin server and therefore may be incorrect.

None None None None None 0

The client request wasn't successful.

NotAcceptable NotAcceptable NotAcceptable NotAcceptable NotAcceptable 406

The client has indicated with Accept headers that it will not accept any of the available representations of the resource.

NotExtended NotExtended NotExtended NotExtended NotExtended 510

The policy for accessing the resource has not been met in the request.

This status code is documented in IETF RFC 2774.

NotFound NotFound NotFound NotFound NotFound 404

The requested resource does not exist on the server.

NotImplemented NotImplemented NotImplemented NotImplemented NotImplemented 501

The server does not support the requested function.

NotModified NotModified NotModified NotModified NotModified 304

The client's cached copy is up to date. The contents of the resource are not transferred.

Ok Ok Ok Ok Ok 200

The request succeeded and that the requested information is in the response. This is the most common status code to receive.

PartialContent PartialContent PartialContent PartialContent PartialContent 206

The response is a partial response as requested by a GET request that includes a byte range.

PaymentRequired PaymentRequired PaymentRequired PaymentRequired PaymentRequired 402

This code is reserved for future use.

PermanentRedirect PermanentRedirect PermanentRedirect PermanentRedirect PermanentRedirect 308

The target resource has been assigned a new permanent URI and any future references to this resource should use one of the returned URIs specified in the Location header.

This status code is documented in IETF draft draft-reschke-http-status-308.

PreconditionFailed PreconditionFailed PreconditionFailed PreconditionFailed PreconditionFailed 412

A condition set for this request failed, and the request cannot be carried out. Conditions are set with conditional request headers like If-Match, If-None-Match, or If-Unmodified-Since.

PreconditionRequired PreconditionRequired PreconditionRequired PreconditionRequired PreconditionRequired 428

The origin server requires the request to be conditional.

This status code is documented in IETF RFC 6585.

Processing Processing Processing Processing Processing 102

The server has received a Web Distributed Authoring and Versioning (WebDAV) request and is processing the request.

This status code is an HTTP extension used with WebDAV. It can only be returned if the client HTTP request included the DAV header in the request. This status code is documented in IETF RFC 2518.

ProxyAuthenticationRequired ProxyAuthenticationRequired ProxyAuthenticationRequired ProxyAuthenticationRequired ProxyAuthenticationRequired 407

The requested proxy requires authentication. The Proxy-Authenticate header contains the details of how to perform the authentication.

RequestedRangeNotSatisfiable RequestedRangeNotSatisfiable RequestedRangeNotSatisfiable RequestedRangeNotSatisfiable RequestedRangeNotSatisfiable 416

The range of data requested from the resource cannot be returned, either because the beginning of the range is before the beginning of the resource, or the end of the range is after the end of the resource.

RequestEntityTooLarge RequestEntityTooLarge RequestEntityTooLarge RequestEntityTooLarge RequestEntityTooLarge 413

The request is too large for the server to process.

RequestHeaderFieldsTooLarge RequestHeaderFieldsTooLarge RequestHeaderFieldsTooLarge RequestHeaderFieldsTooLarge RequestHeaderFieldsTooLarge 431

The server is unwilling to process the request because its header fields are too large. The request may be resubmitted after reducing the size of the request header fields.

This status code is documented in IETF RFC 6585.

RequestTimeout RequestTimeout RequestTimeout RequestTimeout RequestTimeout 408

The client did not send a request within the time the server was expecting the request.

RequestUriTooLong RequestUriTooLong RequestUriTooLong RequestUriTooLong RequestUriTooLong 414

The URI is too long.

ResetContent ResetContent ResetContent ResetContent ResetContent 205

The client should reset (not reload) the current resource.

SeeOther SeeOther SeeOther SeeOther SeeOther 303

Automatically redirects the client to the URI specified in the Location header as the result of a POST. The request to the resource specified by the Location header will be made with the GET method.

ServiceUnavailable ServiceUnavailable ServiceUnavailable ServiceUnavailable ServiceUnavailable 503

The server is temporarily unavailable, usually due to high load or maintenance.

SwitchingProtocols SwitchingProtocols SwitchingProtocols SwitchingProtocols SwitchingProtocols 101

The HTTP protocol version or protocol is being changed.

TemporaryRedirect TemporaryRedirect TemporaryRedirect TemporaryRedirect TemporaryRedirect 307

The request information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.

TooManyRequests TooManyRequests TooManyRequests TooManyRequests TooManyRequests 429

The user has sent too many requests in a given amount of time. The response should include details explaining the condition, and may include a Retry-After header indicating how long to wait before making a new request.

This status code is documented in IETF RFC 6585.

Unauthorized Unauthorized Unauthorized Unauthorized Unauthorized 401

The requested resource requires authentication. The WWW-Authenticate header contains the details of how to perform the authentication.

UnprocessableEntity UnprocessableEntity UnprocessableEntity UnprocessableEntity UnprocessableEntity 422

The server understands the content type of the request entity and the syntax of the request entity is correct, but the server was unable to process the contained instructions.

This status code is an HTTP extension used with Web Distributed Authoring and Versioning (WebDAV). This status code is documented in IETF RFC 4918.

UnsupportedMediaType UnsupportedMediaType UnsupportedMediaType UnsupportedMediaType UnsupportedMediaType 415

The request is an unsupported type.

UpgradeRequired UpgradeRequired UpgradeRequired UpgradeRequired UpgradeRequired 426

The client should switch to a different protocol such as TLS/1.0.

This status code is documented in IETF RFC 2917.

UseProxy UseProxy UseProxy UseProxy UseProxy 305

The request should use the proxy server at the URI specified in the Location header.

VariantAlsoNegotiates VariantAlsoNegotiates VariantAlsoNegotiates VariantAlsoNegotiates VariantAlsoNegotiates 506

The server has an internal configuration error. The chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.

This status code is documented in IETF RFC 2295.

Remarks

The HttpStatusCode enumeration contains the values of the status codes defined by the IETF in RFC 2616 for HTTP 1.1 and related RFCs.

The status of an HTTP request is contained in the StatusCode property on the HttpResponseMessage object.

See also