http
2017-01-11 09:10:21 0 举报
AI智能生成
http
作者其他创作
大纲/内容
报文
request message
request message header
request line
syntax:request-method-name request-URI HTTP-version
request methods:
get
head: to get the header that a GET request would have obtained. Since the header contains the last-modified date of the data, this can be used to check against the local cache copy.
post: post data up to web servers
put: ask web severs to store the data
delete: ask web servers to delete the data
trace: Ask the server to return a diagnostic trace of the actions it takes.
options: Ask the server to return the list of request methods it supports.
connect:Used to tell a proxy to make a connection to another host and simply reply the content, without attempting to parse or cache it. This is often used to make SSL connection through the proxy.
other extension methods
request headers
request-header-name: request-header-value1, request-header-value2, ...
request message body(optional)
response message
response message header
status line
syntax: HTTP-version status-code reason-phrase
response headers
response-header-name: response-header-value1, response-header-value2, ...
response message body(optional)
contain resource data requested
request methods
GET(case sensitive)
head: to get the header that a GET request would have obtained. Since the header contains the last-modified date of the data, this can be used to check against the local cache copy.
post: post data up to web servers
put: ask web severs to store the data
delete: ask web servers to delete the data
trace: Ask the server to return a diagnostic trace of the actions it takes.
options: Ask the server to return the list of request methods it supports.
connect:Used to tell a proxy to make a connection to another host and simply reply the content, without attempting to parse or cache it. This is often used to make SSL connection through the proxy.
other extension methods
response status code(3-digit number)
1xx (Informational): Request received, server is continuing the process.
2xx(Success): The request was successfully received, understood, accepted and serviced.
3xx(Redirection): Further action must be taken in order to complete the request.
4xx(Client Error): The request contains bad syntax or cannot be understood.
5xx(Server Error): The server failed to fulfill an apparently valid request.
0 条评论
下一页