Send a captured request again with one cURL
Buggregator gives every captured HTTP request a copy as cURL button: the URL, headers and body written as one curl command. Paste it in a terminal and the same request arrives again. You do not need the original sender to trigger the webhook or callback again.
Steps
1. Capture the request
Send the request to Buggregator with http-dump as the URL user name. Point a webhook, a callback or your own client at it. In Docker Compose, replace 127.0.0.1 with the Buggregator service name, for example buggregator.
curl 'http://http-dump@127.0.0.1:8000/any/path?foo=bar'2. Or mark it with a header
When the client cannot change the URL user name, add the X-Buggregator-Event header instead.
curl 'http://127.0.0.1:8000/any/path?foo=bar' \
--header 'X-Buggregator-Event: http-dump'3. Copy the cURL command
Open http://127.0.0.1:8000 and open the request. Next to the method, URI, headers, cookies, form data and files, you find the cURL command with a copy button.
4. Paste it in a terminal
The copied command targets Buggregator, so running it as is captures the same request again. To replay it into your own handler, change the URL in the command to your app's address first. Uploaded files are named in the command, not attached.
Why it works
Buggregator stores the whole request it received, then writes it back out as a curl command. Running that command sends the same method, URL, headers and body again. Uploaded files are the one part it does not carry.
Related tips
- HTTP
See a webhook's payload before you write the handler
Point the webhook URL at Buggregator with http-dump in the URL. See the headers, body and files it sends, plus a cURL command to send it again.
- HTTP
See every API call your Python script makes
Route Python requests through Buggregator's HTTP proxy on port 8080. See each request and response with status code and timing. Dev only.
- Mock server
A mock API that returns new fake users on every call
Turn on template for a Buggregator mock rule and fill the body with fake names and emails. New data on each call, or the same data with a seed.
Checked on with Buggregator v2.8.0