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.
- 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