mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Move TypedHeader to axum-extra (#1850)
Co-authored-by: Michael Scofield <[email protected]> Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Michael Scofield
Jonas Platte
parent
173f9f72b0
commit
877e3fe4de
@@ -41,12 +41,14 @@ pub use cookie::Key;
|
||||
/// use axum::{
|
||||
/// Router,
|
||||
/// routing::{post, get},
|
||||
/// extract::TypedHeader,
|
||||
/// response::{IntoResponse, Redirect},
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// http::StatusCode,
|
||||
/// };
|
||||
/// use axum_extra::extract::cookie::{CookieJar, Cookie};
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// extract::cookie::{CookieJar, Cookie},
|
||||
/// };
|
||||
///
|
||||
/// async fn create_session(
|
||||
/// TypedHeader(auth): TypedHeader<Authorization<Bearer>>,
|
||||
|
||||
@@ -23,12 +23,15 @@ use std::{convert::Infallible, fmt, marker::PhantomData};
|
||||
/// use axum::{
|
||||
/// Router,
|
||||
/// routing::{post, get},
|
||||
/// extract::{TypedHeader, FromRef},
|
||||
/// extract::FromRef,
|
||||
/// response::{IntoResponse, Redirect},
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// http::StatusCode,
|
||||
/// };
|
||||
/// use axum_extra::extract::cookie::{PrivateCookieJar, Cookie, Key};
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// extract::cookie::{PrivateCookieJar, Cookie, Key},
|
||||
/// };
|
||||
///
|
||||
/// async fn set_secret(
|
||||
/// jar: PrivateCookieJar,
|
||||
|
||||
@@ -24,12 +24,15 @@ use std::{convert::Infallible, fmt, marker::PhantomData};
|
||||
/// use axum::{
|
||||
/// Router,
|
||||
/// routing::{post, get},
|
||||
/// extract::{TypedHeader, FromRef},
|
||||
/// extract::FromRef,
|
||||
/// response::{IntoResponse, Redirect},
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// http::StatusCode,
|
||||
/// };
|
||||
/// use axum_extra::extract::cookie::{SignedCookieJar, Cookie, Key};
|
||||
/// use axum_extra::{
|
||||
/// TypedHeader,
|
||||
/// headers::authorization::{Authorization, Bearer},
|
||||
/// extract::cookie::{SignedCookieJar, Cookie, Key},
|
||||
/// };
|
||||
///
|
||||
/// async fn create_session(
|
||||
/// TypedHeader(auth): TypedHeader<Authorization<Bearer>>,
|
||||
|
||||
@@ -39,3 +39,7 @@ pub use self::multipart::Multipart;
|
||||
#[cfg(feature = "json-lines")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::json_lines::JsonLines;
|
||||
|
||||
#[cfg(feature = "typed-header")]
|
||||
#[doc(no_inline)]
|
||||
pub use crate::typed_header::TypedHeader;
|
||||
|
||||
Reference in New Issue
Block a user