Sniff and replay HTTP requests and responses — perfect for mocking APIs during testing.
at main 32 lines 1.2 kB view raw view rendered
1# Replay 2 3[![ci](https://github.com/tsirysndr/replay/actions/workflows/ci.yml/badge.svg)](https://github.com/tsirysndr/replay/actions/workflows/ci.yml) 4[![downloads](https://img.shields.io/crates/dr/replay)](https://crates.io/crates/replay) 5[![crates](https://img.shields.io/crates/v/replay.svg)](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![Preview](https://raw.githubusercontent.com/tsirysndr/replay/main/.github/assets/preview.png) 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.