The meaning of various Http status codes

    HTTP Status Code (HTTP Status Code)
    Some common status codes are:

  • 200 The server successfully returned to the page
  • 301 Moved permanently, the requested webpage has been moved permanently to a new address, please use the new address to access, the original address is not available.
  • 302 Temporary move, the requested webpage is temporarily moved to another place, the original address can still be used.
  • 403 The server rejected the request
  • 404 The requested page does not exist
  • 500 server internal error

1. 1xx (provisional response)

    A status code that represents a temporary response and requires the requester to continue the operation.

  • 100 (Continue) The requester should continue to make the request. The server returns this code to indicate that it has received the first part of the request and is waiting for the rest.
  • 101 (Switching protocol) The requester has asked the server to switch the protocol, and the server has confirmed and is ready to switch.

Two, 2xx (success)

    The status code indicating that the request was successfully processed .

  • 200 (Success) The server has successfully processed the request. Usually, this means that the server provided the requested content.
  • 201 (Created) The request was successful and the server created a new resource.
  • 202 (Accepted) The server has accepted the request, but has not yet processed it.
  • 203 (Non-authorized information) The server has successfully processed the request, but the returned information may come from another source.
  • 204 (No content) The server successfully processed the request, but did not return any content.
  • 205 (Reset content) The server successfully processed the request, but did not return any content.
  • 206 (Partial content) The server successfully processed part of the GET request.

Three, 3xx (redirect)

    Indicates that further action is required to complete the request. Usually, these status codes are used for redirection .

  • 300 (multiple choices) In response to requests, the server can perform multiple operations. The server can select an operation based on the requester (user agent), or provide a list of operations for the requester to choose.
  • 301 (Moved Permanently) The requested file has been permanently moved to a new location. When the server returns this response (response to a GET or HEAD request), it will automatically redirect the requester to the new location.
  • 302 (Temporary move) The server previously responded to the request from a different location, but the requester should continue to use the original location for future requests.
  • 303 (View other locations) When the requester should use separate GET requests for different locations to retrieve the response, the server returns this code.
  • 304 (Unmodified) Since the last request, the requested text has not been modified. When the server returns this response, the content will not be returned.
  • 305 (Use proxy) The requester can only use the proxy to access the requested file. If the server returns this response, it also indicates that the requester should use a proxy.
  • 307 (Temporary Redirect) The server previously responded to the request from a different location, but the requester should continue to use the original location for future requests.

Four, 4xx (request error)

    These status codes indicate that the request may have gone wrong , preventing the server from processing.

  • 400 (Bad request) The server does not understand the syntax of the request.
  • 401 (Unauthorized) Request requires authentication. For the web that needs to log in, the server may return this response.
  • 403 (Prohibited) The server rejected the request.
  • 404 (Not Found) The server could not find the requested file.
  • 405 (Method prohibition) The method specified in the request is prohibited.
  • 406 (Not Accepted) The requested content feature cannot be used to respond to the request.
  • 407 (Proxy authorization required) This status code is similar to 401 (Unauthorized), but specifies that the requester should authorize the use of the proxy.
  • 408 (Request timeout) The server timed out while waiting for the request.
  • 409 (Conflict) The server encountered a conflict while fulfilling the request. The server must include information about the conflict in the response.
  • 410 (Deleted) If the requested resource has been permanently deleted, the server will return this response.
  • 411 (Validity Length Required) The server does not accept requests that do not contain a valid content length header field.
  • 412 (Precondition not met) The server did not meet one of the preconditions set by the requester in the request.
  • 413 (The request entity is too large) The server cannot process the request because the request entity is too large, which exceeds the processing capability of the server.
  • 414 (The requested URI is too long) The requested URI (usually the address) is too long and the server cannot process it.
  • 415 (Unsupported media type) The requested format is not supported by the requested page.
  • 416 (The requested range does not meet the requirements) If the page cannot provide the requested range, the server will return this status code.
  • 417 (Less than expected) The server did not meet the requirements of the "expected" request header field.

Five, 5xx (server error)

    These status codes indicate that the server encountered an internal error while trying to process the request. These errors may be errors in the server itself, rather than errors in the request .

  • 500 (Internal server error) The server encountered an error and could not complete the request.
  • 501 (Not yet implemented) The server does not have the function to complete the request. For example, the server may return this code when it cannot recognize the request method.
  • 502 (Error connection) The server was acting as a gateway or proxy, and received an invalid response from the upstream server.
  • 503 (Service unavailable) The server was previously unavailable (due to overload or downtime for maintenance). Usually, this is only a temporary state.
  • 504 (Gateway timeout) The server is acting as a gateway or proxy, but it did not receive a request from the upstream server in time.
  • 505 (HTTP version is not supported) The server does not support the HTTP protocol version used in the request.

Guess you like

Origin blog.csdn.net/sanqima/article/details/108910924