The vast majority of web development is based on this, HTTP is a Hypertext Transfer protocol. is the protocol at the application level .
HTTP is a stateless protocol based on the request/response pattern.
TCP connections are optimized in Http1.1, and multiple requests can be processed within a single connection.
The HTTP request is divided into three parts: 1. Request Line 2. message Header 3. Request body sent by the viewer to the server
I. Introduction:
The request line begins with a method, followed by the version of the request URI and protocol.
Several ways to request http: Get and POST and head
Get: Request for the resource identified by Request--uri;
Post: Append new data after the data identified by Request--uri
HEAD: A header that requests the response of the resource identified by the Request--uri;
When we go to the Web page by entering the URL directly through the browser's address bar, the browser uses the Get method to get the resources like the server;
The Post method is used to send a request to the server, requiring the server to receive the data after the request, and the Post method is used at most when the table is submitted; username=hello&world;
The head method is almost the same as the Get method, except that the head method simply requests the message header;
Two. Description of the http-status code
--1XX: Indicates that the request has been received and continues processing;
--2XX: Success indicates that the request has been received, processed, understood;
--3XX: Redirect to complete the request must be further done
--4XX: Client error, request syntax error or request not implemented
--5XX: Server-side error, the server failed to implement a legitimate request;
Getting Started with Java: HTTP basics