reqwest_mock
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.