Skip to Content
Advanced FeaturesExport & Replay

Export & Replay

APXY lets you export captured traffic as executable commands, replay past requests, compose new ones from scratch, and compare traffic records side by side.

Web UI

  • In the Capture group, open a traffic detail panel and use Export or Replay on a recorded request.
  • Use Compose to build and send a request from scratch.
  • Use Diff to compare two records side by side.

CLI

Export as cURL

Convert a captured traffic record into a ready-to-run snippet:

# Export as cURL (default) apxy logs export-curl --id abc123 # Export as fetch (JavaScript) apxy logs export-curl --id abc123 --format fetch # Export as httpie apxy logs export-curl --id abc123 --format httpie # Export as Python (requests) apxy logs export-curl --id abc123 --format python

Supported formats: curl, fetch, httpie, python

Replay requests

Re-send a previously captured request to the original server:

apxy logs replay --id abc123

Compose custom requests

Send a completely custom HTTP request:

apxy tools request compose \ --method POST \ --url "https://api.example.com/users" \ --headers '{"Authorization": "Bearer token", "Content-Type": "application/json"}' \ --body '{"name": "test"}'
FlagDefaultDescription
--methodGETHTTP method
--urlFull URL (required)
--headers""JSON object of headers
--body""Request body

Diff two records

Compare two captured traffic records:

apxy logs diff --id-a abc123 --id-b def456 --scope response
FlagDefaultDescription
--id-aFirst record ID (required)
--id-bSecond record ID (required)
--scopebothrequest, response, or both

Use Cases

Testing a fix (replay + diff)

# Export the failing request apxy logs export-curl --id <FAIL_ID> # Deploy the fix, then replay apxy logs replay --id <FAIL_ID> # Compare old vs new response apxy logs diff --id-a <FAIL_ID> --id-b <NEW_ID> --scope response

Share a reproducible request

Export a request as a cURL command to share with a colleague or paste into a CI pipeline:

apxy logs export-curl --id abc123 # Output: curl -X POST 'https://api.example.com/users' -H 'Content-Type: application/json' -d '{"name":"test"}'

HAR Import & Export

APXY also supports HAR 1.2  for exchanging traffic with other tools:

# Export all traffic as HAR apxy logs export-har # Import a HAR file (from browser DevTools, Charles, etc.) apxy logs import-har --file ./recording.har

See HAR Import & Export for full details.

Last updated on