EasyHttpMock
EasyHttpMock is a powerful yet simple HTTP mock server designed specifically for testing HTTP clients. Built on top of VeTiS, it provides a clean, intuitive API for creating realistic mock endpoints that simulate real-world API behavior, making your testing workflow faster and more reliable.
Features
- Testing-Focused: Purpose-built for HTTP client testing scenarios
- Lightning Fast: Powered by VeTiS for optimal performance
- Flexible Runtime: Choose between Tokio or Smol async runtimes
- Full Protocol Support: HTTP/1, HTTP/2, and HTTP/3 compatibility
- Secure Testing: Built-in TLS support for HTTPS endpoint testing
- Minimal Dependencies: Lightweight footprint for your test suite
Quick Start
Add to your Cargo.toml:
[dependencies]
easyhttpmock = { version = "0.0.9" }
Basic usage:
Please refer to easyhttpmock-vetis-smol or easyhttpmock-vetis-tokio for usage examples.
Crates
| Crate | Description | Documentation |
|---|---|---|
| easyhttpmock | Core HTTP server library | |
| easyhttpmock-vetis-smol | Smol runtime support | |
| easyhttpmock-vetis-tokio | Tokio runtime support |
Examples
Check out the examples for complete examples of how to use EasyHttpMock in your projects.
Create project from template
You can create a new project from the template using cargo generate:
cargo generate ararog/easyhttpmock-templates
Documentation
Other Projects
- caramelo - Assertion based test framrwork
- deboa - HTTP client
- sofie - Fullstack web framework
- uget - CLI HTTP client
- vetis - Very Tiny Http server
License
This project is licensed under the MIT License.
Author
Rogerio Pereira Araujo rogerio.araujo@gmail.com