Smart Deals - promotions, discount codes and sales

HTTP Methods Reference Guide

Free online HTTP Methods Reference Guide that runs directly in your browser.

Secure (SSL)
Client-Side Processing
100% Free
Instructions
  • 1
    Enter data
    Enter content, paste text or load a file from disk.
  • 2
    Click the button
    The tool will immediately process your data in the browser.
  • 3
    Get the result
    Copy the finished text or save the file to your device.
function runTool() {
  return "Result ready in 0.1s";
}
33 characters

view: detailed view label: Detailed download format: txt download txt: Downloads HTTP methods ====================== Notes: "Secure" means that the method should not change the state of the server. "Idempotent" means that repeating the same request should lead to the same end state. GET — Gets a representation of the resource. Bezpieczna: Yes | Idempotentna: Yes | Cache'owalna: Yes Request content:Nietypowe (zwykle ignorowane). Typowe statusy: 200 OK, 304 Not Modified, 404 Not Found When to use:Use GET to read data without changing the server state. Prefer query parameters for filtering and pagination. Uwagi: GET is the default method for reads and works best with cache and browser tools. Example:curl -i "https://api.example.com/v1/users?limit=20" ---------------------------- POST — Creates a resource or invokes server-side processing. Bezpieczna: No | Idempotentna: No | Cache'owalna: No Request content:Frequent (data to create, command input). Typowe statusy: 201 Created, 202 Accepted, 200 OK, 400 Bad Request, 409 Conflict When to use:Use POST when the server is deciding the URI of a new resource, or when you are sending a command/workflow. Uwagi: If you need secure replays, consider idempotence keys or alternative solutions. Example:curl -i -X POST "https://api.example.com/v1/users" -H "Content-Type: application/json" -d '{"name":"Ada"}' ---------------------------- PUT — Creates or replaces a resource at a known URI. Bezpieczna: No | Idempotentna: Yes | Cache'owalna: No Request content:Frequent (full representation). Typowe statusy: 200 OK, 204 No Content, 201 Created, 400 Bad Request, 404 Not Found When to use:Use PUT for full replacement semantics when a client that knows the target URI can send the complete representation. Uwagi: Since PUT is idempotent, repeating the same request should lead to the same end state. Example:curl -i -X PUT "https://api.example.com/v1/users/123" -H "Content-Type: application/json" -d '{"name":"Ada"}' ---------------------------- DELETE — Deletes a resource. Bezpieczna: No | Idempotentna: Yes | Cache'owalna: No Request content:Nietypowe. Typowe statusy: 204 No Content, 200 OK, 404 Not Found When to use:Use DELETE to remove the resource indicated by the URI. Consider soft-delete if recovery is important. Uwagi: DELETE is idempotent: deleting the same resource twice should result in the same final state (resource absent). Example:curl -i -X DELETE "https://api.example.com/v1/users/123" ---------------------------- PATCH — Applies a partial update to the resource. Bezpieczna: No | Idempotentna: Usually yes (depends on patch format). | Cache'owalna: No Request content:Frequent (partial changes). Typowe statusy: 200 OK, 204 No Content, 400 Bad Request, 404 Not Found, 409 Conflict When to use:Use PATCH when you want to update only certain fields or apply a well-defined set of changes. Uwagi: PATCH may be idempotent, but some patch formats (e.g. "increase") are not. Example:curl -i -X PATCH "https://api.example.com/v1/users/123" -H "Content-Type: application/json" -d '{"email":"[email protected]"}' ---------------------------- OPTIONS — Describes the communication options for the target resource. Bezpieczna: Yes | Idempotentna: Yes | Cache'owalna: No Request content:Nietypowe. Typowe statusy: 204 No Content, 200 OK When to use:Use OPTIONS to discover supported methods or to make CORS preflight requests in the browser. Uwagi: Correct OPTIONS responses are important for browser clients using CORS. Example:curl -i -X OPTIONS "https://api.example.com/v1/users" ---------------------------- download json: [ { "method": "GET", "summary": "Gets a representation of the resource.", "request_body": "Nietypowe (zwykle ignorowane).", "typical_status": [ "200 OK", "304 Not Modified", "404 Not Found" ], "when": "Use GET to read data without changing the server state. Prefer query parameters for filtering and pagination.", "notes": "GET is the default method for reads and works best with cache and browser tools.", "safe": true, "idempotent": true, "cacheable": true, "example": "curl -i \"https://api.example.com/v1/users?limit=20\"" }, { "method": "POST", "summary": "Creates a resource or invokes server-side processing.", "request_body": "Frequent (data to create, command input).", "typical_status": [ "201 Created", "202 Accepted", "200 OK", "400 Bad Request", "409 Conflict" ], "when": "Use POST when the server is deciding the URI of a new resource, or when you are sending a command/workflow.", "notes": "If you need secure replays, consider idempotence keys or alternative solutions.", "safe": false, "idempotent": false, "cacheable": false, "example": "curl -i -X POST \"https://api.example.com/v1/users\" -H \"Content-Type: application/json\" -d '{\"name\":\"Ada\"}'" }, { "method": "PUT", "summary": "Creates or replaces a resource at a known URI.", "request_body": "Frequent (full representation).", "typical_status": [ "200 OK", "204 No Content", "201 Created", "400 Bad Request", "404 Not Found" ], "when": "Use PUT for full replacement semantics when a client that knows the target URI can send the complete representation.", "notes": "Since PUT is idempotent, repeating the same request should lead to the same end state.", "safe": false, "idempotent": true, "cacheable": false, "example": "curl -i -X PUT \"https://api.example.com/v1/users/123\" -H \"Content-Type: application/json\" -d '{\"name\":\"Ada\"}'" }, { "method": "DELETE", "summary": "Deletes a resource.", "request_body": "Nietypowe.", "typical_status": [ "204 No Content", "200 OK", "404 Not Found" ], "when": "Use DELETE to remove the resource indicated by the URI. Consider soft-delete if recovery is important.", "notes": "DELETE is idempotent: deleting the same resource twice should result in the same final state (resource absent).", "safe": false, "idempotent": true, "cacheable": false, "example": "curl -i -X DELETE \"https://api.example.com/v1/users/123\"" }, { "method": "PATCH", "summary": "Applies a partial update to the resource.", "request_body": "Frequent (partial changes).", "typical_status": [ "200 OK", "204 No Content", "400 Bad Request", "404 Not Found", "409 Conflict" ], "when": "Use PATCH when you want to update only certain fields or apply a well-defined set of changes.", "notes": "PATCH may be idempotent, but some patch formats (e.g. \"increase\") are not.", "safe": false, "idempotent": "Usually yes (depends on patch format).", "cacheable": false, "example": "curl -i -X PATCH \"https://api.example.com/v1/users/123\" -H \"Content-Type: application/json\" -d '{\"email\":\"[email protected]\"}'" }, { "method": "OPTIONS", "summary": "Describes the communication options for the target resource.", "request_body": "Nietypowe.", "typical_status": [ "204 No Content", "200 OK" ], "when": "Use OPTIONS to discover supported methods or to make CORS preflight requests in the browser.", "notes": "Correct OPTIONS responses are important for browser clients using CORS.", "safe": true, "idempotent": true, "cacheable": false, "example": "curl -i -X OPTIONS \"https://api.example.com/v1/users\"" } ] download csv: method,summary,request_body,typical_status,when,safe,idempotent,cacheable GET,"Gets a representation of the resource.","Nietypowe (zwykle ignorowane).","200 OK | 304 Not Modified | 404 Not Found","Use GET to read data without changing the server state. Prefer query parameters for filtering and pagination.",Yes,Yes,Yes POST,"Creates a resource or invokes server-side processing.","Frequent (data to create, command input).","201 Created | 202 Accepted | 200 OK | 400 Bad Request | 409 Conflict","Use POST when the server is deciding the URI of a new resource, or when you are sending a command/workflow.",No,No,No PUT,"Creates or replaces a resource at a known URI.","Frequent (full representation).","200 OK | 204 No Content | 201 Created | 400 Bad Request | 404 Not Found","Use PUT for full replacement semantics when a client that knows the target URI can send the complete representation.",No,Yes,No DELETE,"Deletes a resource.",Nietypowe.,"204 No Content | 200 OK | 404 Not Found","Use DELETE to remove the resource indicated by the URI. Consider soft-delete if recovery is important.",No,Yes,No PATCH,"Applies a partial update to the resource.","Frequent (partial changes).","200 OK | 204 No Content | 400 Bad Request | 404 Not Found | 409 Conflict","Use PATCH when you want to update only certain fields or apply a well-defined set of changes.",No,"Usually yes (depends on patch format).",No OPTIONS,"Describes the communication options for the target resource.",Nietypowe.,"204 No Content | 200 OK","Use OPTIONS to discover supported methods or to make CORS preflight requests in the browser.",Yes,Yes,No

Rate this tool:

Related tools

Other tools you may find useful

Guide 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.

HTTP methods GET POST PUT DELETE HTTP verbs REST API HTTP methods

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.

Install Webp.pl Have the tools in your own pocket!