Brief HTTP content request (get and post requests request) and corresponding response

Link Analysis:

https://oa.hbgf.net.cn/login.jsp;jsessionid=47084322738F8DB18D60752944DFD1AA

 

http or https expressed using the http protocol or https protocol , followed with a domain name, back to? Before the call path? After the call parameters

 

http: // domain // path //? parameters

A plurality of parameters & symbolic links

 

Header :

Request URL: https://oa.hbgf.net.cn/resource/js/base64.js?s_cache=1575255899708

Request method: the Get

Remote Address: 221.230.3.228:443

Status Code : 200 is OK

Version : HTTP / 1.1

 

Request method :

Get: a request acquiring request-URI of the resource identifiers

The POST : the request-URI additional new data identified resource

The HEAD : Request by the Request-URI of the response message to the identified resource packet header

The PUT : a storage resource request to the server, and use Request-URI as identification

DELETE : delete server request Request-URI resource identified

The TRACE : echo request information requesting server received mainly used for testing or diagnosis

The CONNECT : Reserved for future use

The OPTIONS : Request query performance servers , or query and resource -related options and requirements

 

For example :

Post Method : asks the server has received the requested data back attached to the request, to submit the form used.

 

Requests consists of three parts composed of : a request line , request header, the request body

 

Some browser requests above the head will have a line of GET . . . Called the request line

The request line : GET /.html HTTP / 1.1

Request header :

 

Accept:

*/*

Accept-Encoding

:gzip, deflate, br

Accept-Language

: Zh-CN, zh; q = 0.8, zh-TW; q = 0.7, zh-HK; q = 0.5, en-US; q = 0.3, en; q = 0.2

Connection:

keep-alive

Cookie:

route=4ded6ae40558cd54d12e1621…84322738F8DB18D60752944DFD1AA

Host:

oa.hbgf.net.cn

Referer:

https://oa.hbgf.net.cn/login.j…084322738F8DB18D60752944DFD1AA

User-Agent:

Mozilla/5.0 (Windows NT 6.1; W…) Gecko/20100101 Firefox/60.0

 

Each request header fields meanings:

Accept for: tell the server, the client machine data types supported

Charset-the Accept : tell the server to the client using code

Encoding-the Accept : tell the server that the client supports data compression format

Language-the Accept : tell the language used by the client server

Host : Tell the server you want to access the host name

Since-Hodified-IF : By this tells the server resources cache time

Referer : tell the server what it was by one to access the server resources ( security chain)

User-Agent: the client through this tells the server, the client software environment , browser version

The cookie : Through this data to the server with

 

 

HTTP response also includes three sections: a status line, a message packet header, the response body

Status line : for describing a server processing result to the request.

Header / response header : used to describe the basic description information of the server, and data server through description of these data, the client may inform how it will loopback processing data.

Response text : on behalf of the server to the client to send back data

 

Status line : the HTTP / 1.1 200 is the OK

In response header :

 

Accept-Ranges

bytes

Access-Control-Allow-Origin

*

Cache-Control:

max-age=604800

Connection:

keep-alive

Content-Length:

3075

Content-Type:

application/javascript

Date:

Fri, 13 Dec 2019 08:36:43 GMT

ETag:

W/"3075-1575190034000"

Expires:

Mon, 09 Dec 2019 03:04:59 GMT

Last-Modified:

Sun, 01 Dec 2019 08:47:14 GMT

Server:

nginx

Response data :

html{ height:100%;}

body.tTemplate{

    background:url(../images/body_bg.png) no-repeat right 50px #f7f7f7;

}

Each response header meaning fields:

LOCATION : The head with the 302 status code to use for telling customers to whom

Server : server through the head, told the type of browser servers

Encoding-Content : data compression format

The Length-Content : tell the browser to send data back length

Type-Content : Tell Liu pulled server returns data types

Modified-Last : tell the browser cache time the current resource

Refresh : tell the browser how often to refresh

Disposition-Content : tell the browser to open the way to download data

Encoding-Transfer : tell the browser data transfer format

The ETag : caching the respective head

The Expires : server through the head, telling the browser to cache resources loopback how long, -1 or 0 , no cache

Catch-Controlno-cache

Pragmaticno-cache

By the above two heads, not to control the browser cache data

Connection:

keep-alive, the connection holding means is a three-way handshake may be directly sent without a request.

Connection:

close, each request must be made three-way handshake.

 

Status Code :

100-199 : represents successful reception request to the client to continue to submit the next request to complete the whole process

200-299 : identifying successfully received the request and has completed the entire process, commonly 200

300-399 : to complete the request, the client requests further refinement, e.g., the requested resource has been moved to a new address: used 302 , 307 , 304

400-499 : the client's request error, commonly 404 , request link does not exist

500-599 : server error

 

Guess you like

Origin www.cnblogs.com/sy-zxr/p/12160175.html