Expand description
Helpers for testing apps that use crux_http.
The two entry points mirror the two things a feature can receive:
ResponseBuilderbuilds theOk(Response)of a successful exchange.rejectionbuilds theErr(HttpError::Http { .. })of a 4xx/5xx rejection, body included — orrejection_from, when the rejection’s headers matter too.
There is no third case: a Response never carries an error status, so
ResponseBuilder refuses to build one.
Structs§
- Response
Builder - Allows users to build an http response.
Functions§
- rejection
- Build the
crux_http::Resulta feature receives when the server rejects a request. - rejection_
from - Build the
crux_http::Resulta feature receives for a rejection, from a full protocol response.