ForHosting KIT · Web Scraping & Monitoring

Check whether an HTTP method is safe or idempotent

Find out whether a method can be repeated without surprises: put, typed with spaces, is read as PUT, not safe but idempotent, so sending it twice has the same intended effect as sending it once. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Safe and idempotent are two different promises

A safe method is meant to fetch information or ask which options a server offers, not to change anything there. HEAD, OPTIONS and TRACE belong to that group, and every safe method is also idempotent. Idempotent is the wider promise: sending the same message several times has the same intended effect as sending it once. PUT and DELETE keep that promise without being safe, because storing the same content again or deleting the same item again adds no new effect.

When to check before a retry

The question matters most when a connection drops and you cannot tell whether the server received the message. Before automatic retries are switched on for a method, check it here: you get the method in capitals, whether it is safe, whether it is idempotent and a short combined label. Letter case and extra spaces are ignored, so put becomes PUT. A typical mistake is to treat idempotent as harmless; DELETE does change data, it just does not change it twice. Unknown or invented names are refused rather than guessed.

Review retry middleware

Check a configured method before enabling automatic retries after ambiguous transport failures.

Why is DELETE idempotent if the second request can return a different status?

Idempotency concerns the intended effect on the server, not identical responses. Repeated deletion requests still intend the same resulting resource state.

Are lowercase method names accepted?

Yes. The checker trims surrounding whitespace and normalizes the supplied name to uppercase before classification.

What happens with WebDAV or custom methods?

They are rejected as unrecognized. Their properties must be determined from the specification or application contract that defines them.

What is the difference between safe and idempotent?

A safe method only fetches information and asks for no change on the server. An idempotent one may change things, but sending it twice has the same intended effect as sending it once. PUT and DELETE are idempotent without being safe.

Which methods does it recognize?

The nine standard methods of the core web protocol and the PATCH specification, such as PUT, PATCH, DELETE, HEAD, OPTIONS and TRACE. Letter case and spaces around the name are ignored, so put is read as PUT.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev2/http-method-idempotent-check

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/dev2/http-method-idempotent-check \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"PUT"}'
{
  "method": "PUT"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev2.http_method_idempotent_check",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Classify a standard HTTP method by the safety and idempotency properties defined by HTTP semantics. Enter a method such as GET, POST, PUT, PATCH, or DELETE and receive normalized method text, separate Boolean results, and a concise combined classification. The checker recognizes the nine methods defined across the core HTTP semantics and PATCH specifications, ignores surrounding whitespace and letter case, and rejects unknown names instead of making assumptions about extension methods.

Distinguish safety from idempotency

Safety and idempotency describe different promises. A safe method is intended for information retrieval or communication options rather than a requested state change on the origin server. Idempotency is broader: it means that multiple identical requests have the same intended effect on the server as one such request. PUT and DELETE are idempotent even though they are not safe, because replacing a representation with the same representation again, or repeatedly requesting deletion of the same resource, does not introduce a new intended effect each time. GET, HEAD, OPTIONS, and TRACE are safe. HTTP semantics also define every safe method as idempotent, so those methods receive the combined `safe_and_idempotent` classification. The response exposes `safe` and `idempotent` separately so policy code does not need to infer one property from a label. It also returns a `classification` field for display, logging, or simple branching. These properties concern standardized request semantics, not whether a particular implementation is bug-free or free from incidental side effects.

Interpret retries correctly

Idempotency is especially useful when deciding whether an automated client may retry a request after a connection failure. For example, an initial DELETE can remove a resource and return success, while a later identical DELETE can report that the resource no longer exists; the intended server state is still the same. PUT is similarly idempotent when the repeated requests carry the same target and representation. A client might not know whether the server received the first request, so repeating an idempotent method preserves the request's intended effect. That does not guarantee identical response status codes or bodies. POST and PATCH are classified as neither safe nor idempotent by their general method definitions. A specific API can design an individual POST or PATCH operation to be retryable, perhaps through an idempotency key or conditional request, but that application-level contract does not change the default standardized property of the method itself. Use this result as a protocol baseline, then apply any stronger guarantees explicitly documented by the API you are calling.

Validate method names before applying policy

Guessing the properties of an extension method from its spelling could approve an unsafe retry or block a valid operation. If your system uses an extension method, consult the specification that registers or defines it and handle that method through an explicit policy. The algorithm performs no network request and never observes a live server, route implementation, cache, proxy, or request body. The checker accepts the standard method names CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, and TRACE. Input is trimmed and converted to uppercase, so values such as ` get ` and `patch` are normalized without changing their meaning. Any other value produces an `invalid_input` error. This strict behavior matters because HTTP method tokens are extensible: WebDAV and other protocols define additional methods, and private APIs can introduce their own tokens. It is deterministic and suitable for linters, API documentation checks, retry middleware configuration, and browser-based learning tools.

Lint API documentation

Compare endpoint method choices with documentation that claims an operation is safe or idempotent.

Teach HTTP semantics

Show the separate safety and idempotency properties for common methods with one deterministic lookup.

Is every safe method also idempotent?

Yes. HTTP semantics define safe methods as idempotent, so GET, HEAD, OPTIONS, and TRACE have both properties.

Is PATCH idempotent?

PATCH is not idempotent by default. A particular API can define a retry-safe PATCH operation, but that is an application-specific guarantee.

Read the full KIT documentation →