Description
HTTP (HyperText Transfer Protocol) is the most widely used network protocol on the Internet. Is a client and server side request and response standard (TCP). Typically, a request is made by the HTTP client to establish a TCP connection to the server’s designated port (the default is port 80). The HTTP server listens on the port for requests sent by the client. Once the request is received, the server (to the client) sends a response message.
The first behavior of the response message is in the following format:
HTTP-VersionSPStatus-CodeSPReason-PhraseCRLF
HTTP-Version indicates the supported HTTP version, for example, HTTP/1.1.
Status-Code is a three-digit result code. Reason-Phrase provides a simple textual description of Status-Code. Status-Code is mainly used for automatic machine identification, and Reason-Phrase is mainly used to help users understand. The first number of Status-Code defines the category of the response, and the last two digits do not have a classification effect. The first number may take 5 different values:
1xx: information response class, indicating that the request is received and processing continues;
2xx: Processing a successful response class, indicating that the action was successfully received, understood, and accepted;
3xx: Redirect response class, in order to complete the specified action, must accept further processing;
4xx: Client error, the client request contains a syntax error or is not executed correctly;
5xx: The server is wrong, the server cannot correctly execute a correct request.