deftools.io Developer Tools

HTTP Method Reference

Quick reference for all HTTP methods. Learn what each method does, when to use it, and see code examples.

About this tool

HTTP defines a small set of request methods (sometimes called verbs) that tell the server what the client wants to do with a resource. GET reads, POST creates, PUT and PATCH update, DELETE removes — and less common ones like HEAD, OPTIONS, and CONNECT serve specific infrastructure roles.

This reference lists every method with its safety, idempotence, cacheability, typical status codes, and a copy-pasteable fetch example. Type a method name in the search box to jump straight to it, or filter by category (safe, idempotent, cacheable).

Useful when designing a REST API, reviewing a colleague's endpoint, or double-checking whether a method is supposed to be cacheable before wiring it into a CDN.

FAQ

What is the difference between safe and idempotent?

A safe method (GET, HEAD, OPTIONS) does not change server state — calling it has no side effects. An idempotent method (GET, HEAD, OPTIONS, PUT, DELETE) gives the same result no matter how many times you call it. POST is neither: repeating it may create duplicate records.

When should I use PATCH instead of PUT?

Use PUT when you are replacing an entire resource (sending every field); use PATCH for partial updates (only the fields that changed). PUT is idempotent by spec; PATCH semantics depend on the format but in practice is treated as idempotent for JSON merges.

Is HEAD the same as GET without a body?

Almost. HEAD returns exactly the same headers as a GET would, but no body — perfect for checking existence or size before downloading, or for CDN prefetching.

What does OPTIONS do?

OPTIONS asks the server which methods are allowed on a resource. Browsers send it automatically as a CORS preflight before cross-origin requests that use custom headers or methods other than GET/POST/HEAD.

More developer tools

Copied!