From b26fd03810770a10259f110131042cc2a22b39aa Mon Sep 17 00:00:00 2001 From: Kelly Thomas Kline Date: Sun, 7 Nov 2021 00:54:53 -0700 Subject: [PATCH] Add recommendation (#476) --- axum/src/extract/typed_header.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/axum/src/extract/typed_header.rs b/axum/src/extract/typed_header.rs index 17c037e5..16c4b2ed 100644 --- a/axum/src/extract/typed_header.rs +++ b/axum/src/extract/typed_header.rs @@ -6,7 +6,9 @@ use headers::HeaderMapExt; use http_body::Full; use std::{convert::Infallible, ops::Deref}; -/// Extractor that extracts a typed header value from [`headers`]. +/// Extractor that extracts a typed header value from [`headers`]. In general, it's +/// recommended to extract only the needed headers via `TypedHeader` rather than removing all +/// headers with the `HeaderMap` extractor. /// /// # Example ///