PUT
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
HTTP PUT
请求方法创建一个新的资源或用请求的有效载荷替换目标资源的表示。
PUT
与 POST
方法的区别是,PUT
方法是幂等的:调用一次与连续调用多次效果是相同的(即没有副作用),而连续调用多次相同的 POST
方法可能会有副作用,比如多次提交同一订单。
语法
http
PUT /new.html HTTP/1.1
示例
请求
http
PUT /new.html HTTP/1.1
Host: example.com
Content-type: text/html
Content-length: 16
<p>新文件</p>
响应
规范
Specification |
---|
HTTP Semantics # PUT |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
PUT |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.