HTTP requests have been used a lot lately, but there is still some ambiguity about the format names of HTTP requests. mainly:
HATE
URL
QueryString
HOST
PORT
Schema
The differences between these four are explained in detail below.
- HATE
A URI represents a resource identifier and represents a path to a resource. The official explanation is: the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. Simply put, it is the part between Port and QueryString
- URL
URL stands for Uniform Resource Locator, which represents the location of a resource on the Internet. The official explanation is: The URL contains a protocol, server name, port number, and server path, but it does not include query string parameters. In short, it is the part before QueryString.
- QueryString
QueryString is the query string by name, and in the request it is the part after the question mark (regardless of the anchor ).
- HOST
HOST is generally a domain name, but it can also be ip+port
- PORT
The port refers to the port that provides services on the server. Generally, the server will listen to this port to receive requests. Default is 80
- Schema
Indicates the protocol used, the common ones are http https ftp. In http, Schema refers to http
Example: http://www.baidu.com/a/b?k=10
Schema: http
HOST: www.baidu.com
PORT: none
URL:www.baidu.com/a/b
URI:: /a/b
QueryString:k=10