Sniff and replay HTTP requests and responses — perfect for mocking APIs during testing.
1# Replay
2
3[](https://github.com/tsirysndr/replay/actions/workflows/ci.yml)
4[](https://crates.io/crates/replay)
5[](https://crates.io/crates/replay)
6
7This tool acts as a transparent HTTP proxy that intercepts and records all incoming and outgoing requests and responses. You can later replay these captured interactions to mock the real API without needing live network access — ideal for:
8
9- End-to-end tests
10- CI environments
11- Offline development
12- Contract testing
13
14
15
16## 🚚 Installation
17
18```sh
19cargo-binstall replay
20```
21
22## ✨ Features
23- 🧲 Record HTTP traffic in real time
24- 🧪 Replay and mock previously recorded requests
25- 🛠️ Supports REST, GraphQL, and any HTTP-based API
26- 📦 Store interactions locally
27- ⚡ Fast and lightweight proxy implementation
28
29## 🔧 Example Use Case
301. Run your app through the proxy once to record real API interactions.
312. Save the recorded sessions.
323. Switch to mock mode for testing — no real API calls needed.