reqwest_mock

Provides a mockable reqwest-like HTTP client.


Keywords
http, client, request, reqwest, rust
License
Apache-2.0

Documentation

reqwest_mock

crates.io Docs Build Status

Provides a mockable [reqwest][]-like HTTP client.

Write your code generic over the Client trait, and in production use DirectClient while in testing you can use ReplayClient, which will record a request the first time and replay it every time the exact same request is made in the future.