A standard trait for doing fluent assertions over many http client response. Currently, supports actix-web, rocket, reqwest, hyper, axum, awc (Actix Web Client), surf, ureq and isahc.
Getting started
Add it to your Cargo.toml
= { = "0.6.1", = ["reqwest"] }
# or features = ["hyper"]
# or features = ["actix"]
# or features = ["axum"]
# or features = ["actix-web-client"]
# or features = ["rocket"]
# or features = ["surf"]
# or features = ["ureq"]
# or features = ["isahc"]
Then use it in your tests, for example on actix-web,
use ;
use *;
async
or on reqwest
use reqwest;
use *;
async
Customize
You don't like the asserhttp methods name ? That's fine, you can define yours. Define you own trait and use asserhttp methods to define your own !
As simple as this:
!;
asserhttp_customize
gRPC
Asserting gRPC is also supported with a tonic client. Simply turn on the tonic
feature and use it like this:
use *;
async