# HTTP Method Alternative Check

> Test whether authorization discriminates by HTTP method, so an operation gated for GET stays gated for POST, PATCH, DELETE and overrides. Use when routes accept more than one method or the framework poaches methods such as HEAD, OPTIONS or platform-modified verbs

- Skill: `wsh7ash/http-method-alternative-check` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/http-method-alternative-check`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/http-method-alternative-check/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/http-method-alternative-check

---


# HTTP Method Alternative Check

> Test whether authorization discriminates by HTTP method, so an operation gated for GET stays gated for POST, PATCH, DELETE and overrides

**Use when:** routes accept more than one method or the framework poaches methods such as HEAD, OPTIONS or platform-modified verbs

**Avoid when:** each resource exposes a single method and route tables prove it, which closes every relevant path

## Procedure

1. Determine which methods each route actually serves by checking its implementation, not by assuming REST symmetry.
2. Send the same protected resource with every accepted method while keeping only the caller credential as the variable.
3. Include HEAD and OPTIONS, which frameworks frequently serve before reaching handler authorization code.
4. Test platform or header-based method overrides such as X-HTTP-Method-Override where the framework documents them.
5. Confirm the object-level and function-level checks apply identically under every method that reaches data access.
6. Record a full method-by-watch outcome grid for each endpoint so the coverage of the guard is explicit.

## Signals

- GET refuses with 403 while HEAD or POST drains or mutates data, showing the check applied only to a subset.
- An override header switches the verb after middleware authorization, reaching handlers that never re-check.
- OPTIONS reveals method support plus handler metadata the documentation omitted, expanding the attack surface map.
- DELETE succeeds for a peer-owned object when the read path refused the identical credential.

## Patterns

**1. Method grid**

```text
op /api/items/{own-owned}: GET=403 HEAD=200 POST=403 DELETE=403 PATCH=200 -> guard covers 3/5
```

**2. Override probe**

```text
POST /api/order + X-HTTP-Method-Override: DELETE -> handler invoked? -> override must re-authorize
```

**3. Result row**

```text
endpoint=/api/items/{id} methods_tested=5 accepted_methods=2 skips_checks=HEAD,PATCH
```

## Pitfalls

- Firing only the REST-verb tour and missing HEAD or override headers that framework layers answer directly.
- Interpreting a 405 Method Not Allowed as a keyword victory without checking whether data was already touched.
- Assuming one honored method implies all methods are honored, since per-method handlers fork the check entirely.

## Done when

- Every accepted method on every sampled protected route has a verdict recorded against the caller credential.
- Method-override paths in the framework have been verified to re-run authorization before any state change.

## References

- [MDN - HTTP request methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)

