HTTP Methods Reference Guide
Free online HTTP Methods Reference Guide that runs directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulGuide to HTTP methods - complete description GET, POST, PUT, DELETE
HTTP methods (HTTP verbs) define the action that the client wants to perform on the server resource. Correct use of HTTP methods is the basis of REST API design. The guide covers all methods: semantics, idempotency, security and practical applications.
Basic HTTP methods
GET: get resource. Safe, idempotent, no body. POST: create a resource or send data. It is not idempotent. PUT: replace the resource completely. Idempotent. PATCH: modify partially. DELETE: delete a resource. Idempotent (multiple DELETE = same effect). HEAD: like GET but without the body (check the headers). OPTIONS: what methods the endpoint supports.
Security and idempotency
Safe method: does not change the server state (GET, HEAD, OPTIONS). Idempotent: multiple requests = same result (GET, PUT, DELETE, HEAD). POST: NOT idempotent (multiple = multiple records). PATCH: may be idempotent depends on implementation. Practical importance: retry logic. If GET/PUT/DELETE timeout → safe retry. POST → may duplicate data.
PUT vs PATCH
PUT: replace entire resource. You must send a complete representation. PUT /users/1 with {name:"Jan", email:"[email protected]"} → replaces all fields. PATCH: modify selected fields. PATCH /users/1 from {email:"[email protected]"} → only changes email. RFC 5789 defines PATCH. JSON Patch (RFC 6902): add/remove/replace/move operations. JSON Merge Patch (RFC 7396): simpler format.
HTTP response codes for methods
GET 200 OK (found), 404 Not Found. POST 201 Created (with Location header), 400 Bad Request. PUT 200 OK or 204 No Content. PATCH 200 OK. DELETE 204 No Content (success without body), 404 if does not exist. OPTIONS 200 with Allow header: GET, POST, PUT, DELETE. HEAD: like GET but the response body is empty.
FAQ
What is the difference between POST and PUT?
POST: creates a resource, server-generated resource URL. POST /api/users → the server decides the ID. PUT: replaces the resource at a specific URL. PUT /api/users/123 → the client knows the target URL. POST is not idempotent (two POSTs = two records). PUT is idempotent (two PUTs = one resource). In REST API: POST for create, PUT for update/replace.
When to use PATCH instead of PUT?
PATCH when you want to change only one/a few fields and do not want to send the entire object. PUT is better when you want to replace a resource completely. Example: user has 20 fields. Change email: PATCH /users/1 {email: "[email protected]"} (you send 1 field). PUT would require all 20 fields. PATCH saves bandwidth. Caveat: PATCH requires careful implementation (partial update logic).
Why does an HTML form only support GET and POST?
HTML4/5 specification (form method): GET and POST only. History: HTML older than REST. Workarounds: method overriding (PUT/DELETE in hidden field), AJAX (fetch/XHR can use all methods). Framework: Laravel: @method('PUT') on the form. Django: similar methods. In modern SPA applications (React, Vue): AJAX + all HTTP methods.
What are idempotent requests and why are they important?
Idempotency: f(f(x)) = f(x). Multiple calls produce the same result. Practical significance: retry on timeout. DELETE /orders/1: if timeout → retry → safe (404 if already deleted). POST /orders: if timeout → UNSAFE retry (duplicate order). Solution for POST: Idempotency-Key header (Stripe API). UUID in the request body.