mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +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
@@ -1,6 +1,10 @@
|
||||
use axum::{
|
||||
extract::{FromRequest, TypedHeader, rejection::TypedHeaderRejection},
|
||||
extract::FromRequest,
|
||||
response::Response,
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
typed_header::TypedHeaderRejection,
|
||||
headers::{self, UserAgent},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
use axum::{
|
||||
extract::{rejection::TypedHeaderRejection, FromRequestParts, TypedHeader},
|
||||
headers::{self, UserAgent},
|
||||
extract::FromRequestParts,
|
||||
response::Response,
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
typed_header::TypedHeaderRejection,
|
||||
headers::{self, UserAgent},
|
||||
};
|
||||
|
||||
#[derive(FromRequestParts)]
|
||||
struct Extractor {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use axum::{
|
||||
response::Response,
|
||||
extract::{
|
||||
rejection::TypedHeaderRejection,
|
||||
Extension, FromRequest, TypedHeader,
|
||||
},
|
||||
extract::{Extension, FromRequest},
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
typed_header::TypedHeaderRejection,
|
||||
headers::{self, UserAgent},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
use axum::{
|
||||
response::Response,
|
||||
extract::{
|
||||
rejection::TypedHeaderRejection,
|
||||
Extension, FromRequestParts, TypedHeader,
|
||||
},
|
||||
extract::{Extension, FromRequestParts},
|
||||
};
|
||||
use axum_extra::{
|
||||
TypedHeader,
|
||||
typed_header::TypedHeaderRejection,
|
||||
headers::{self, UserAgent},
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ use axum::{
|
||||
http::StatusCode,
|
||||
response::{IntoResponse, Response},
|
||||
routing::get,
|
||||
body::Body,
|
||||
Extension, Router,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user