docs.rs failed to build easyhttpmock-0.1.3-beta.8
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
easyhttpmock-0.1.3-beta.7
EasyHttpMock
The effortless HTTP mock server for seamless API testing
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.
Why EasyHttpMock?
- 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 EasyHttpMock to your Cargo.toml:
easyhttpmock =
Usage Example
Here's how simple it is to create a mock HTTP server for testing:
use StatusCode;
use ;
use ;
use Response;
pub const CA_CERT: & = include_bytes!;
pub const CA_CERT_PEM: & = include_bytes!;
pub const SERVER_CERT: & = include_bytes!;
pub const SERVER_KEY: & = include_bytes!;
async
Perfect For
- Unit Testing: Mock external APIs in your test suite
- Integration Testing: Test HTTP client behavior without real services
- Load Testing: Simulate API responses under various conditions
- Debugging: Reproduce API issues in a controlled environment
- Documentation: Create interactive API examples
Supported Runtimes
Crate Features
- tokio-rt (default) - Tokio runtime support
- smol-rt - Smol runtime support
- http1 - HTTP/1 protocol support
- http2 (default) - HTTP/2 protocol support
- http3 - HTTP/3 protocol support
- tokio-rust-tls (default) - TLS support for Tokio
- smol-rust-tls - TLS support for Smol
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Author
Rogerio Pereira Araujo rogerio.araujo@gmail.com