UNPKG

http-status-code

Version:
42 lines (35 loc) 2.53 kB
// Additional HTTP Status Codes // http://tools.ietf.org/html/6585 { // 4xx - User Error // The 428 status code indicates that the origin server requires the request to be conditional. Its // typical use is to avoid the 'lost update' problem, where a client GETs a resource's state, modifies // it, and PUTs it back to the server, when meanwhile a third party has modified the state on the // server, leading to a conflict. By requiring requests to be conditional, the server can assure that // clients are working with the correct copies. Responses using this status code SHOULD explain how to // resubmit the request successfully. Responses with the 428 status code MUST NOT be stored by // a cache. "428": "Precondition Required", // The 429 status code indicates that the user has sent too many requests in a given amount of time // ('rate limiting'). The response representations SHOULD include details explaining the condition, and // MAY include a Retry-After header indicating how long to wait before making a new request. Responses // with the 429 status code MUST NOT be stored by a cache. "429": "Too Many Requests", // The 431 status code indicates that 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. It can be used both when the set of request header fields in total is too large, and // when a single header field is at fault. In the latter case, the response representation SHOULD // specify which header field was too large. Responses with the 431 status code MUST NOT be stored by // a cache. "431": "Request Header Fields Too Large", // 5xx - Server Error // The 511 status code indicates that the client needs to authenticate to gain network access. The // response representation SHOULD contain a link to a resource that allows the user to submit // credentials (e.g., with an HTML form). Note that the 511 response SHOULD NOT contain a challenge or // the login interface itself, because browsers would show the login interface as being associated with // the originally requested URL, which may cause confusion. The 511 status SHOULD NOT be generated by // origin servers; it is intended for use by intercepting proxies that are interposed as a means of // controlling access to the network. Responses with the 511 status code MUST NOT be stored by // a cache. "511": "Network Authentication Required" }