hyper-mock-client

Crates.iohyper-mock-client
lib.rshyper-mock-client
version0.1.3
sourcesrc
created_at2022-10-11 19:04:10.881784
updated_at2022-10-11 19:22:24.422902
descriptionhyper::client mock to test tower::services such as axum::router
homepagehttps://github.com/chbm/hyper-mock-client
repositoryhttps://github.com/chbm/hyper-mock-client
max_upload_size
id685532
size6,492
Carlos Morgado (chbm)

documentation

README

hyper::client mock

A mock of hyper::client to test tower::Services like axum::router.

Usage

See the tests of the lib. Create an instance of the Service you want to test and create a new client with MockClient::new(app). The MockClient has an interface similar to hyper::client with MockClient::request(hyper::Request) being your main method but returning a simple Future<Response<Body>>.

License

This project is licensed under the MIT license.

Commit count: 4

cargo fmt