อ้างอิง HTTP Method
คู่มืออ้างอิงครบถ้วนสำหรับ HTTP methods ทั้งหมดพร้อมคุณสมบัติ กรณีใช้งาน และรหัสสถานะทั่วไป
การประมวลผลทั้งหมดเกิดขึ้นในเบราว์เซอร์ของคุณ ไม่มีการอัปโหลดข้อมูล
อ้างอิง HTTP Method
คู่มืออ้างอิงครบถ้วนสำหรับ HTTP methods ทั้งหมดพร้อมคุณสมบัติ กรณีใช้งาน และรหัสสถานะทั่วไป
🔒การประมวลผลทั้งหมดเกิดขึ้นในเบราว์เซอร์ของคุณ ไม่มีการอัปโหลดข้อมูล
ค้นหาตามชื่อ method คำอธิบาย หรือกรณีใช้งาน...
เปรียบเทียบด่วน
| Method | ปลอดภัย | Idempotent | แคชได้ | Request Body | Response Body |
|---|---|---|---|---|---|
GET | ใช่ | ใช่ | ใช่ | ไม่บังคับ | ใช่ |
HEAD | ใช่ | ใช่ | ใช่ | ไม่บังคับ | No |
POST | No | No | No | ใช่ | ใช่ |
PUT | No | ใช่ | No | ใช่ | ไม่บังคับ |
PATCH | No | No | No | ใช่ | ใช่ |
DELETE | No | ใช่ | No | ไม่บังคับ | ไม่บังคับ |
OPTIONS | ใช่ | ใช่ | No | ไม่บังคับ | ใช่ |
TRACE | ใช่ | ใช่ | No | No | ใช่ |
CONNECT | No | No | No | No | ใช่ |
รายละเอียด Method
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.นิยามคุณสมบัติ
ปลอดภัย:method จะปลอดภัยหากไม่เปลี่ยนสถานะของเซิร์ฟเวอร์ กล่าวอีกนัยหนึ่ง method จะปลอดภัยหากนำไปสู่การดำเนินการแบบอ่านอย่างเดียว method ที่ปลอดภัยสามารถแคชและดึงข้อมูลล่วงหน้าได้โดยไม่มีความเสี่ยง
Idempotent:method จะเป็น idempotent หากผลกระทบที่ตั้งใจบนเซิร์ฟเวอร์ของการส่งคำขอครั้งเดียวเหมือนกับผลกระทบของการส่งคำขอที่เหมือนกันหลายครั้ง method ที่ปลอดภัยทั้งหมดเป็น idempotent รวมถึง PUT และ DELETE
แคชได้:การตอบสนองที่แคชได้คือการตอบสนอง HTTP ที่สามารถแคชเพื่อนำกลับมาใช้ใหม่สำหรับคำขอถัดไป การตอบสนอง GET และ HEAD มักจะแคชได้
