HTTP协议学习笔记-2

时间:2021-11-01 08:27:22

HTTP报文

HTTP报文分为请求报文和响应报文(requeset and response)

请求报文的格式:

<method>  <request -URL> <version>

<headers>

<entity- body>

http://  home.cnblogs.com/user/CurrentUserInfo   ?_=1429596439807   200OK

method    URL                                                         parameter                  status

响应报文格式:

<version> <status> <reason-phrase>

<headers>

<entity - body>

常用HTTP方法:

get  :   get a file from server

head : only get the head of file from server

post : send the data needed processing to server

put : store a part of main body that is requesting to server

trace : trace the message that may be reported by proxy server

options: decide which method can be executed on server

delete  : delete a file from server

http status code:

scope                 used             meaning

100-199             100-101        message tips

200-299              200-206       success

300-399              300-305       redirect

400-499               400-415       client error

500-599               500-505        server error

小弟懒的切输入法,本着呼吁广大博友学习英语的原则就用英语写了(本人英语也不好,共同学习)