Summary of HTTP status codes in RESTFUL

Common

• 2xx Operation is successful
o 200 Normal success returns
o 201 The server resource already exists, directly return
o 202 The request has been submitted and is being processed asynchronously
• 3xx Address redirection, the interface or address has been removed
• 4xx Client request error
o 400 Client general request error
o 401 Not logged in or session expired (login required but not logged in or session expired)
o 403 No permission to access, operate (IP restricted or logged in but no permission)
o 404 Interface does not exist or request address does not exist
o 405 The request method is incorrect If a GET request is required, it is actually a
POST request the response to. Clients should be prepared to receive one or more 1xx responses before receiving a regular response. • 0 - The local response was successful. • 100 - Continue The initial request has been accepted and the client should continue sending the rest of the request. (New in HTTP 1.1) • 101 - Switching Protocols The server will follow the client's request and switch to another protocol. (New in HTTP 1.1) 2xx - Success This type of status code indicates that the server successfully accepted the client request.















• 200 - OK everything is OK, the response documents to GET and POST requests follow.
• 201 - Created The server has created the document, and the Location header gives its URL.
• 202 - Accepted The request has been accepted, but processing has not yet completed.
• 203 - Non-Authoritative Information The document has been returned normally, but some response headers may be incorrect because a copy of the document is used, non-authoritative information (new in HTTP 1.1).
• 204 - No Content There is no new document, the browser should continue to display the original document. This status code is useful if the user periodically refreshes the page and the servlet can determine that the user's document is sufficiently up-to-date.
• 205 - Reset Content There is no new content, but the browser should reset what it is displaying. Used to force the browser to clear form inputs (new in HTTP 1.1).
• 206 - Partial Content The client sent a GET request with a Range header and the server completed it (new in HTTP 1.1).

3xx - Redirect The

client browser must do more to fulfill the request.
• 300 - Multiple Choices The document requested by the customer can be found in multiple locations, which are listed in the returned document. If the server wants to propose a preference, it should indicate it in the Location response header.
• 301 - Moved Permanently The document requested by the client is elsewhere, the new URL is given in the Location header, and the browser should automatically access the new URL.
• 302 - Found Similar to 301, but the new URL should be considered a temporary replacement, not a permanent one. Note that the corresponding status message in HTTP 1.0 is "Moved Temporatily". When this status code occurs, the browser can automatically access the new URL, so it is a useful status code. Note that this status code can sometimes be used instead of 301. For example, if the browser incorrectly requests http://host/~user (missing the trailing slash), some servers will return 301, while others will return 302. Strictly speaking, we can only assume that the browser will automatically redirect only if the original request was a GET. See 307.
• 303 - See Other Similar to 301/302, except that if the original request was a POST, the redirect target document specified by the Location header should be fetched via GET (new in HTTP 1.1).
• 304 - Not Modified The client has buffered documents and made a conditional request (usually providing an If-Modified-Since header indicating that the client only wants documents newer than the specified date). The server tells the client that the original buffered document can still be used.
• 305 - Use Proxy The document requested by the client should be fetched through the proxy server indicated by the Location header (new in HTTP 1.1).
• 307 - Temporary Redirect is the same as 302 (Found). Many browsers will incorrectly redirect in response to a 302 response, even if the original request was a POST, even though it can actually only redirect if the response to a POST request was a 303. For this reason, HTTP 1.1 added 307 to more clearly distinguish several status codes: when a 303 response appears, the browser can follow redirected GET and POST requests; if it is a 307 response, the browser can only follow Redirection for GET requests. (New in HTTP 1.1)

4xx - Client Error

An error occurred and the client seems to have a problem. For example, the client requests a page that does not exist, and the client did not provide valid authentication information.

• 400 - Bad Request The request has a syntax error.
• 401 - Unauthorized Access Denied, the client attempted unauthorized access to a password-protected page. The response will contain a WWW-Authenticate header, according to which the browser displays the username/password dialog, and then makes the request again after filling in the appropriate Authorization headers. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser but not in the IIS log:
• 401.1 - Login failed.
• 401.2 - Login failed due to server configuration.
• 401.3 - Unauthorized due to ACL restrictions on resources.
• 401.4 - Filter authorization failed.
• 401.5 - ISAPI/CGI application authorization failed.
• 401.7 – Access denied by URL authorization policy on web server. This error code is specific to IIS 6.0.
• 403 - Forbidden resource unavailable. The server understands the client's request, but refuses to process it. Usually due to permission settings on files or directories on the server. Access Forbidden: IIS defines a number of different 403 errors that indicate more specific error causes:
• 403.1 - Execution access is forbidden.
• 403.2 - Read access forbidden.
• 403.3 - Write access forbidden.
• 403.4 - SSL required.
• 403.5 - SSL 128 required.
• 403.6 - IP address denied.
• 403.7 - Client certificate required.
• 403.8 - Site Access Denied.
• 403.9 - Too many users.
• 403.10 - Invalid configuration.
• 403.11 - Password Change.
• 403.12 - Access to mapping table is denied.
• 403.13 - Client certificate revoked.
• 403.14 - Deny Directory Listing.
• 403.15 - Client Access License Exceeded.
• 403.16 - Client certificate is not trusted or invalid.
• 403.17 - The client certificate has expired or is not yet valid.
• 403.18 - The requested URL cannot be executed in the current application pool. This error code is specific to IIS 6.0.
• 403.19 - Cannot perform CGI for clients in this application pool. This error code is specific to IIS 6.0.
• 403.20 - Passport login failed. This error code is specific to IIS 6.0.
• 404 - Not Found The resource at the specified location could not be found. This is also a common answer.
• 404.0 - (none) – The file or directory was not found.
• 404.1 - The website cannot be accessed on the requested port.
• 404.2 - Web Services Extension Lockdown Policy blocked this request.
• 404.3 - MIME mapping policy blocked this request.
• 405 - Method Not Allowed The request method (GET, POST, HEAD, DELETE, PUT, TRACE, etc.) is not applicable to the specified resource, and the HTTP verb used to access this page is not allowed (method not allowed) (HTTP 1.1 new )
• 406 - Not Acceptable The specified resource has been found, but its MIME type is incompatible with that specified by the client in the Accpet header, and the client browser does not accept the MIME type of the requested page (new in HTTP 1.1).
• 407 - Proxy Authentication Required Proxy authentication is required, similar to 401, meaning the client must first be authorized by the proxy server. (New in HTTP 1.1)
• 408 - Request Timeout The client has not made any requests within the wait time allowed by the server. The client can repeat the same request at a later date. (New in HTTP 1.1)
• 409 - Conflict is usually associated with PUT requests. The request could not succeed because the request conflicts with the current state of the resource. (New in HTTP 1.1)
• 410 - The document requested by Gone is no longer available, and the server does not know which address to redirect to. It differs from 404 in that returning 407 means that the document has permanently left the specified location, while 404 means that the document is unavailable for unknown reasons. (New in HTTP 1.1)
• 411 - Length Required The server cannot process the request unless the client sends a Content-Length header. (New in HTTP 1.1)
• 412 - Precondition Failed Some of the preconditions specified in the request header failed (new in HTTP 1.1).
• 413 – Request Entity Too Large The size of the target document exceeds what the server is currently willing to handle. The server SHOULD provide a Retry-After header (new in HTTP 1.1) if it believes it can process the request later.
• 414 - Request URI Too Long The URI is too long (new in HTTP 1.1).
• 415 – Unsupported media type.
• 416 – Requested Range Not Satisfiable The server could not satisfy the Range header specified by the client in the request. (New in HTTP 1.1)
• 417 – Execution failed.
• 423 – Locked error.

5xx - Server Error The

server was unable to complete the request because it encountered an error.

• 500 - Internal Server Error The server encountered an unexpected condition and was unable to fulfill the client's request.
• 500.12 - The application is busy restarting on the web server.
• 500.13 - The web server is too busy.
• 500.15 - Direct requests to Global.asa are not allowed.
• 500.16 – Incorrect UNC authorization credentials. This error code is specific to IIS 6.0.
• 500.18 – URL authorization store cannot be opened. This error code is specific to IIS 6.0.
• 500.100 - Internal ASP error.
• 501 - Not Implemented The server does not support the functionality required to implement the request, and the header value specifies an unimplemented configuration. For example, the client made a PUT request that the server does not support.
• 502 - Bad Gateway When the server was acting as a gateway or proxy, it reached the next server in order to complete the request, but the server returned an invalid response. It also says that the web server received an invalid response when acting as a gateway or proxy server.
• 502.1 - CGI Application Timeout.
• 502.2 - CGI application error.
• 503 - Service Unavailable The service is unavailable and the server failed to respond due to maintenance or heavy load. For example, a servlet might return 503 when the database connection pool is full. The server MAY provide a Retry-After header when returning a 503. This error code is specific to IIS 6.0.
• 504 - Gateway Timeout A gateway timed out, used by a server acting as a proxy or gateway to indicate that a response from the remote server could not be obtained in a timely manner. (New in HTTP 1.1).
• 505 - HTTP Version Not Supported The server does not support the HTTP version specified in the request.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326511977&siteId=291194637