HTTP 方法參考

所有 HTTP 方法的完整參考指南,包含屬性、使用案例和常見狀態碼

所有處理皆在瀏覽器中完成,不會上傳任何資料。
Offline Ready

HTTP 方法參考

所有 HTTP 方法的完整參考指南,包含屬性、使用案例和常見狀態碼

🔒所有處理皆在瀏覽器中完成,不會上傳任何資料。
依方法名稱、描述或使用案例搜尋...
快速比較
方法安全冪等可快取請求主體回應主體
GET
是是是選填是
HEAD
是是是選填No
POST
NoNoNo是是
PUT
No是No是選填
PATCH
NoNoNo是是
DELETE
No是No選填選填
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 回應通常是可快取的。