Reference for HTTP methods (GET, POST, PUT, etc.). Part of the DevTools Surf developer suite. Browse more tools in the Info / Guides collection.
Use Cases
Reference the semantic difference between PUT and PATCH before designing an API update endpoint.
Understand safe and idempotent method properties to decide which method to use for a new endpoint.
Look up which methods are used in CORS preflight to configure server-side CORS handling correctly.
Verify which HTTP methods a REST API supports by interpreting an OPTIONS response.
Tips
Use PATCH for partial updates and PUT for complete resource replacement — misusing PUT for partial updates can accidentally clear unspecified fields.
HEAD requests are underused: they fetch the same headers as GET without the body, useful for checking resource existence, size, and cache freshness without downloading the content.
OPTIONS is automatically sent by browsers for CORS preflight — understanding this removes confusion about 'extra' requests in network DevTools.
Fun Facts
HTTP/1.0 (1996) defined only GET, POST, and HEAD. The additional methods (PUT, DELETE, OPTIONS, TRACE, CONNECT) were added in HTTP/1.1 (1997). PATCH was added much later via RFC 5789 in 2010.
The HTTP TRACE method, intended for diagnostic loop-back, was used in a Cross-Site Tracing (XST) attack discovered in 2003 — browsers now block JavaScript from initiating TRACE requests.
REST (Representational State Transfer) wasn't defined until Roy Fielding's 2000 doctoral dissertation. The CRUD-to-HTTP-method mapping (POST=create, GET=read, PUT=update, DELETE=delete) that developers use daily is a convention, not part of HTTP's specification.
FAQ
What makes a method idempotent?
Calling an idempotent method multiple times produces the same result as calling it once. GET, PUT, DELETE, HEAD, and OPTIONS are idempotent. POST is not — calling POST twice creates two resources.
What's the difference between safe and idempotent?
Safe methods don't change server state (GET, HEAD, OPTIONS). Idempotent methods can be repeated without additional effect (GET, PUT, DELETE). A method can be idempotent without being safe (DELETE changes state but is idempotent).
When should I use PATCH instead of PUT?
PATCH when you're sending only the fields to update. PUT when you're sending the complete resource representation. A PUT with missing fields should clear those fields; a PATCH only updates what's provided.