The journal
GET, POST, PUT and DELETE: Trace Four Methods With One Example Record
Map four common HTTP methods to one fictional inventory record. Check request intent, the target URI and resulting state before relying on a response code.

At a glance
GET retrieves a representation. POST asks the target resource to process submitted content. PUT creates or replaces state at the target URI. DELETE asks to remove the target resource’s association. Read the service contract to see exactly which methods and results it supports.
In this guide
GET, POST, PUT and DELETE are four common HTTP methods. Review them together on one fictional inventory record. The important detail is the method and the URI pairing. Then compare the documented response with what you expect the service to hold after the request.
Put the method beside the exact target
Imagine a collection at /items. Under this service’s fictional contract, POST to that collection creates a new item and the service assigns /items/17. GET to /items/17 retrieves the item’s representation. PUT to the same item URI asks the service to replace its state with the supplied representation. DELETE then requests that the service remove the target resource’s association. The service contract tells you which of those actions an actual route supports.
| Method and target | Intended action | What to verify |
|---|---|---|
| POST /items | Request creation under the collection’s contract | Response identifies the new item URI |
| GET /items/17 | Read the current record | Representation matches the response contract |
| PUT /items/17 | Replace state at the known target | Read the record back and check the new values |
| DELETE /items/17 | Remove the association for the target | Check the contract’s response and follow-up state |

Read the standard’s method definitions RFC 9110, section 9.3: Method definitions.
Sources: IETF
Verify the example record before and after
Suppose the example item represents clips with a quantity of three. The first GET should return that data if you created it with the stated quantity. A later PUT replaces it with a quantity of five. Read the item again and verify five in the returned representation. If the example contract says the deleted item is unavailable, assert that result after DELETE. This checks a separate observation from the write status itself.

Read the 201 Created entry RFC 9110, section 15.3.2: 201 Created.
Sources: RFC 9110, section 9.3: Method definitions · RFC 9110, section 15.3.2: 201 Created
Check whether a repeat has the same intended effect
RFC 9110 defines idempotence by intended effect on the server. After two identical PUT calls the example quantity stays five, even if the responses differ. Retrying the collection POST after a missing response can create a second item if the service contract offers no safe way to avoid it. Record what the application actually promises, and use a test fixture to prove the outcome your caller relies on.


Review one request flow
- Write the intended effect and target first.
- Record the exact starting state.
- Assert the documented response and resulting state.
- Check retry behaviour against the specific API contract.
Request intent and repeat behavior are separate checks.
Same intended effect
Repeating identical requests with an idempotent method has the same intended effect on the target.
Same returned status
The responses can differ when the first request changes the starting state. Read the contract and verify the final state.
Check the specification’s meaning of idempotent RFC 9110, section 9.2.2: Idempotent methods.
For the related task, see Read the conditional GET example.
Sources: RFC 9110, section 9.2.2: Idempotent methods · RFC 9110, section 9.3: Method definitions
Frequently asked questions
Does POST always create a record?
No. POST requests target-specific processing. This inventory collection is an example where its documented processing creates an item.
Can PUT create an item?
The specification allows PUT to create at the target URI when supported and the target had no current representation.
Does DELETE prove the storage bytes were erased?
Its request semantics concern the target resource association. The underlying data retention and business effects depend on the service.
Does using an idempotent method guarantee the same response twice?
Check the intended effect. Status or timestamps can differ, even when the target effect remains the same.
Test the three PUT result cases
Check status and content for create, update with body, and update without body.
Run the three local PUT examplesContinue with a related guide
- Test the three PUT result cases
Check status and content for create, update with body, and update without body.
- Read the conditional GET example
See how the starting request and cached representation change the response.
- Check the representation headers
Separate what the client sends from what it is willing to receive.