【HTTP】HTTP Quick Start

Request: The client sends data to the server

Response: The server sends data to the client

Sending data conforms to the HTTP transport protocol


Features:

Advanced Protocol Based on TCP/IP

Default port number: 80

Based on request/response model: one request, one response

Stateless: each request is independent of each other and cannot exchange data

historic version:

1.0: A new connection is established for each request correspondingly

1.1: Multiplexing connections


Request method:

 get:

*Request parameters are in the request line, after the url 

*The length of the requested url is limited

post:

*Request parameters are in the request body

* There is no limit to the length of the requested url


Data Format:

Request message data format:

Request line: request method request url request protocol/version

request header: request header name: request header value

Common request headers:

HOST: The requested host

User-Agent: Tell the server the version information of the browser used (you can get the information of this header on the server side to solve the compatibility problem of browsers, different browsers respond to different codes)

 Accept: what kind of information can be parsed

Accept-Encoding: Acceptable compression format

 

 Connection: keep-alive (reusable connection)

Referer: Notify where the server comes from (hot chain (prevent entry from other pages), statistical work (where statistics come from to enter the website))

 

Request blank line: blank line, separating request header and request body

Request body: the request parameters that encapsulate the POST request message

 


Right click, check, network, refresh, click login.html


Guess you like

Origin blog.csdn.net/m0_52043808/article/details/123903179