FM-034 Additional Request Handling and HTTP Behavior

HTTP Method and Operation Semantics Failures

GET changes server state, DELETE is inconsistent, or PUT and PATCH behave identically when they should have different update semantics.

Failure explanation

An endpoint does not follow the semantics promised by its HTTP method. GET should be safe and should not intentionally change business state. PUT generally represents replacement of a resource representation and is idempotent by definition; PATCH applies partial modifications according to its patch format; DELETE should have documented repeated-call behavior. Incorrect semantics can cause caches, crawlers, retries, clients, and intermediaries to behave unexpectedly.

Example

A client sends GET /invoices/123?sendReminder=true, and the server sends an email as a side effect. A monitoring system retries the GET and sends multiple reminders.

How to test

  • Exercise each supported method and unsupported methods.
  • Repeat requests and compare state changes.
  • Verify GET/HEAD safety, PUT idempotency, PATCH media type and semantics, and DELETE behavior.
  • Check Allow headers or documented method-not-allowed responses.

Expected behavior

Each method follows its documented HTTP and resource semantics. Side-effecting actions use an appropriate operation and are not hidden behind safe methods.

Runnable examples

Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.