Interview preparation HTTP protocol

The main features of the http protocol

// a quick and easy resource is fixed (uniform resource identifier) ​​UII

There is a flexible // http header data types, perform different types of transmission data

No connection will be disconnected once // link

Stateless // client and server are two identities middle http establish a link (link not distinguish the identity of two persons)

http message part

Request packet:

Request line: Request Methods page address http protocol version

Request Header // key value header

Blank line / r / n / r / n

Request member body

HTTP method

GET --- access to resources

POST --- transmission resources

PUT ---- update the resource

DELETE --- delete resources

HEAD --- get the message headers

POST and GET difference

GET POST requests harmless again when fallback

GET address generated may not post collection

GET will be actively browser cache. POST will not be set unless

GET can only be URL encoded, POST variety of coding

GET parameters will be intact in history. post will not

GET transfer parameters in the url that have length restrictions, post no

get only accept ascll characters. post will not

get more secure than post. Because the parameters directly exposed on the url, all sensitive information can not pass

get passed through the url. post on the request body in

 

Guess you like

Origin www.cnblogs.com/-constructor/p/11964358.html