HTTP Methods

Complete reference of HTTP methods with descriptions and typical use cases.

The data

0

Method
GET
Description
Retrieves a resource. Safe, idempotent. Should not modify server state.
Request body
false

1

Method
POST
Description
Submits data to the server. Not idempotent. Creates a new resource.
Request body
true

2

Method
PUT
Description
Replaces a resource at a specific URI. Idempotent.
Request body
true

3

Method
PATCH
Description
Partially updates a resource. Not idempotent in general.
Request body
true

4

Method
DELETE
Description
Removes a resource at a specific URI. Idempotent.
Request body
false

5

Method
HEAD
Description
Same as GET but returns only headers, no body. Safe, idempotent.
Request body
false

6

Method
OPTIONS
Description
Returns the allowed HTTP methods for a URL. Used for CORS preflight.
Request body
false

7

Method
TRACE
Description
Echoes back the received request. Used for debugging. Rarely implemented.
Request body
false

8

Method
CONNECT
Description
Establishes a tunnel to the server. Used for HTTPS via proxy.
Request body
false

Fetch the same bytes

The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.

curl "https://yjtoon.com/api/dataset/http-methods?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/http-methods.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • web
  • http
  • methods
  • api
  • rest