0x00 HTTP Method Definitions
HTTP请求方法在1.1中定义如下,具体可以查看协议,go
0x01 OPTIONS
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI
OPTIONS方法用于获取指定URI请求或响应通信链上的有关通信选项信息。
0x02 GET
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI
GET方法用于检索或获取服务器上的指定的资源。
0x03 HEAD
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
HEAD方法和GET方法的区别在于,请求的响应中不保护消息体,只返回请求响应头。
0x04 POST
The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource ide

本文详细介绍了HTTP请求的8种方法:OPTIONS用于获取通信选项,GET用于获取资源,HEAD类似于GET但不返回消息体,POST用于创建资源,PUT用于更新资源,DELETE用于删除资源,TRACE用于诊断请求消息,CONNECT用于建立隧道。
最低0.47元/天 解锁文章
1288

被折叠的 条评论
为什么被折叠?



