HTTP request headers and common response status codes

Source: Internet
Author: User
Tags mime file send cookies

Request Header:
    • Accept: Refers to the MIME file format in which the browser or other customer can receive the love. The appropriate file format can be judged and returned according to it.
    • Accept-charset: Indicates the character encoding that the browser can accept. The default value for the English browser is iso-8859-1.
    • Accept-language: Indicates the type of language that the browser can accept, such as en or en-us, referring to English.
    • Accept-encoding: Indicates how the browser can accept the encoding. Encoding differs from file format in order to compress files and speed up file delivery. The browser decodes the Web response after it receives it, and then checks the file format.
    • Cache-control: Sets relevant options for the request to be stored by the proxy server. Generally not used.
    • Connection: Used to tell the server whether a fixed HTTP connection can be maintained. http/1.1 uses keep-alive as the default, so that when a browser needs multiple files (such as an HTML file and related graphics files), it does not need to establish a connection every time.
    • Content-type: The content type used for table name request. Can be obtained using the HttpServletRequest getContentType () method.
    • Cookie: This property is used by the browser to send cookies to the server. Cookies are small data bodies that are stored in a browser, which can record user information related to the server, and can also be used to implement conversational functions.
    • Add:
      The status code consists of three digits, the first number defines the category of the response, and there are five possible values:

      • 1XX: Indication information--Indicates that the request has been received and continues processing
      • 2XX: Success-Indicates that the request has been successfully received, understood, accepted
      • 3XX: Redirect--further action is required to complete the request
      • 4XX: Client Error--Request syntax error or request not implemented
      • 5XX: Server-side error-the server failed to implement a legitimate request
    • Common status codes, status descriptions, descriptions:
      • $ OK//client request succeeded
      • Bad Request//client requests have syntax errors and cannot be understood by the server
      • 401 Unauthorized//request unauthorized, this status code must be used with the Www-authenticate header field
      • 403 Forbidden//server receives request, but refuses to provide service
      • 404 Not Found//request resource not present, eg: Wrong URL entered
      • Internal Server error//server unexpected errors
      • 503 Server Unavailable//server is currently unable to process client requests and may return to normal after some time
      • eg:http/1.1 OK (CRLF)

HTTP request headers and common response status codes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.