The recording proxy captures HTTP requests and responses flowing through it, then exports them as .http files. It is a fast way to bootstrap tests from existing API traffic.
How It Works
- Start the proxy pointing at your target server
- Send requests through the proxy (manually or from your app)
- Stop the proxy (Ctrl+C)
- hitspec exports all captured traffic as a
.http file
Quick Start
Flags
Examples
What Gets Recorded
The proxy captures:
- HTTP method and URL
- Request headers
- Request body
- Response status code
What Gets Sanitized
The proxy automatically sanitizes sensitive headers in the output:
Authorization headers are replaced with placeholders
Cookie headers are replaced with placeholders
- Other sensitive headers are cleaned
The exported .http file follows standard hitspec format:
After recording, edit the generated file to add meaningful assertions, replace hardcoded values with variables, and add @depends directives for request ordering.