1. HTTP protocol
1. Introduction to HTTP protocol
HTTP: (HyperText Transfer Protocol) Hypertext Transfer Protocol is an application layer protocol based on the request and response mode, and it is also the most widely used network protocol on the Internet.
Features of the HTTP protocol:
- Support client/server mode;
- simple and fast;
- flexible;
- no connection;
- no status;
2、URL
URL: (Uniform Resource Locator) Uniform Resource Locator, which is the address of a standard resource on the Internet. HTTP uses URLs to establish connections and transfer data.
URL format:
http://www.ihrm.cn:8080/news/index.html?uid=123&page=1
- Protocol part: "http", common protocols include HTTP, HTTPS, FTP, etc.;
- The domain name part: "www.ihrm.cn", you can also use the IP address as the domain name;
- Port part: "8080", the port can be omitted, the default port (HTTP:80, HTTPS:443, FTP:21);
- Resource path part: "/news/index.html";
- Query parameter part: "uid=123&page=1", multiple parameters are allowed, and "&" is used as a separator between multiple parameters;
Example:
Query weather information: ht