HTTP 方法参考

全面的 HTTP 方法参考指南,包含属性、使用场景和常见状态码

所有处理均在浏览器中完成,不会上传任何数据。
Offline Ready

HTTP 方法参考

全面的 HTTP 方法参考指南,包含属性、使用场景和常见状态码

🔒所有处理均在浏览器中完成,不会上传任何数据。
按方法名、描述或使用场景搜索...
快速对比
方法安全幂等可缓存请求体响应体
GET
可选
HEAD
可选No
POST
NoNoNo
PUT
NoNo可选
PATCH
NoNoNo
DELETE
NoNo可选可选
OPTIONS
No可选
TRACE
NoNo
CONNECT
NoNoNoNo
方法详情
GET
Retrieve a representation of the specified resource. GET requests should only retrieve data.
HEAD
Same as GET, but the server must not return a message body in the response.
POST
Submit data to the specified resource, often causing a change in state or side effects on the server.
PUT
Replace the entire target resource with the request payload.
PATCH
Apply partial modifications to a resource.
DELETE
Remove the specified resource from the server.
OPTIONS
Describe the communication options for the target resource.
TRACE
Perform a message loop-back test along the path to the target resource.
CONNECT
Establish a tunnel to the server identified by the target resource.
属性定义
安全:如果一个方法不会改变服务器状态,则该方法是安全的。换句话说,安全方法只会导致只读操作。安全方法可以被缓存和预获取而不会有风险。
幂等:如果发送单个请求和发送多个相同请求对服务器的预期效果相同,则该方法是幂等的。所有安全方法都是幂等的,PUT 和 DELETE 也是。
可缓存:可缓存响应是可以被缓存以用于后续请求的 HTTP 响应。GET 和 HEAD 响应通常是可缓存的。