Skip to main content
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

  1. Start the proxy pointing at your target server
  2. Send requests through the proxy (manually or from your app)
  3. Stop the proxy (Ctrl+C)
  4. 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

Output Format

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.
Last modified on February 10, 2026