pub async fn request(
router: &Router,
method: Method,
path: &str,
json: Option<&str>,
) -> TestResponseExpand description
Sends a request through the router without a network. json (when
Some) becomes a JSON body with content-type: application/json.
ยงPanics
Panics when the router itself fails (never for ordinary responses).