Decide when to retry a recorded HTTP request
Admin ·
If a connection drops after a client sends a write request, the server may already have acted. Start by finding the method in the capture. Then check the operation's contract before deciding whether to repeat it.
Check the method in a four-line capture
Expand Check recorded request lines, then choose Load capture example and Inspect capture. Each row uses the original line number. The three write methods ask for changes, so each reports Safe: No. PUT reports Idempotent: Yes.
Replace lowercase get on line 4 with uppercase GET. Inspect again. The line changes from a case-sensitive suggestion to Recognized, with both Safe and Idempotent set to Yes.
| Line | Recorded method | Expected result |
|---|---|---|
| 1 | POST | Unsafe and not idempotent |
| 2 | PUT | Unsafe and idempotent |
| 3 | PATCH | Unsafe and not idempotent by method definition |
| 4 | get | Case-sensitive match suggestion for GET |
Choose whether to repeat the request
For the order POST example, a timeout leaves the outcome unknown. Use the API's order lookup or its documented idempotency mechanism when available. Creating a second order can repeat the effect.
For the PUT example, sending the same representation again requests the same intended state. Verify that the target and payload match. If concurrent edits matter, use the conditions supported by the API.
For PATCH, read the patch format and operation. A field replacement can have a different retry risk from appending to a list. A strong ETag with If-Match can prevent applying a patch to an unexpected revision when the server supports conditional requests.
RFC 9110, common method propertiesRFC 5789, the HTTP PATCH methodRFC 9110, If-Match
Review the request example against the actual endpoint
Open the PATCH reference and inspect Content-Type and If-Match. The example uses a merge-patch document and a synthetic validator. Use only the formats and validators advertised by your endpoint.
If a proxy returns 405, look for the Allow field in that captured response. The field records methods supported by the target at that time. Download the method report if you need to record the line numbers. It includes method findings without the request targets.
Common questions
Does idempotent mean the response repeats?
It describes the intended effect of an identical request. The response can change, as when a first DELETE returns 204 and a repetition returns 404.
Does safe mean the server records zero side effects?
The client requests a read-only action. The server can still record logs or collect ordinary metrics as side effects of serving that request.