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>New File</p>
回應
規範
Specification |
---|
HTTP Semantics # PUT |
瀏覽器相容性
BCD tables only load in the browser