mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-03 00:00:07 +02:00
Refactor TypedHeader extractor (#189)
I should use `HeaderMapExt::typed_try_get` rather than implementing it manually.
This commit is contained in:
@@ -45,7 +45,7 @@ mod for_services {
|
||||
async fn get_handles_head() {
|
||||
let app = route(
|
||||
"/",
|
||||
get(service_fn(|req: Request<Body>| async move {
|
||||
get(service_fn(|_req: Request<Body>| async move {
|
||||
let res = Response::builder()
|
||||
.header("x-some-header", "foobar".parse::<HeaderValue>().unwrap())
|
||||
.body(Body::from("you shouldn't see this"))
|
||||
|
||||
Reference in New Issue
Block a user