Keep a reference request
Save the method, full URL, relevant headers and raw body separately. Record the app version and session that produced them. Check whether the capture tool decoded or changed the displayed content before using that view as the raw request.
Keep the query string's encoding and repeated parameters intact. Let the HTTP client calculate the content length for the body it sends. Record fresh credentials and signing inputs without putting private values into shared shell history or reports.
Send the saved body bytes
Use --data-binary @body.bin for a body saved as a file and set its content type. For a fresh form submission, use --data-urlencode. For an exact captured form or multipart body, send the saved bytes and matching content type. Rebuilding fields can change encoding or multipart boundaries. The cURL manual documents these options.
curl --request POST 'https://example.com/api/items' --header 'Content-Type: application/json' --data-binary @body.binThis is an example URL and body filename. Use the actual request's URL and saved body when testing your app integration.
Refresh the state used by later requests
Track cookies, tokens, timestamps, nonces and signatures from their source. A frozen token tests only the session it belongs to. A reusable client needs the code that creates or refreshes it and the sequence of calls that supplies its inputs.
Use a small wrapper when fresh values must be computed before cURL runs. Compare the bytes it signs with the body it sends, then check a changed input and a fresh session.
Match the transport you are testing
cURL supports public-key pinning with --pinnedpubkey on supported TLS backends. Its CA setup depends on the build and options. Keep certificate validation enabled and inspect curl --version for the build's capabilities.
HTTP event streams can be read with --no-buffer. WebSockets and gRPC need their own handshake, framing and payload handling; choose a client that matches the protocol being tested. A streamed response alone is not a reason to discard cURL.
Compare results before repeating writes
Check the response body and resulting app state, not just the status code. One accepted request establishes that tested combination of input and state. It does not establish every field or operation in the API.
Before repeating a write after a connection failure, check whether the server applied the first request or supports an idempotency mechanism. HTTP's retry guidance distinguishes safe retry decisions from blind repetition.
Move the working request into the full client
Build the signing, session refresh and request sequence into the delivered code. Use the signing example for byte comparisons, replay diagnosis for rejected calls, and Postman delivery for an importable client.
Reviewed 19 October 2026 · SReverse research desk