mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-25 00:00:23 +02:00
A few small refactorings (#655)
* Simplify json content-type check * Import HeaderMap from http instead of from headers The headers crate is an optional dependency and its HeaderMap re-export is `#[doc(hidden)]`. * Use headers re-export in axum in examples
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
use axum::{
|
||||
async_trait,
|
||||
extract::{FromRequest, RequestParts, TypedHeader},
|
||||
headers::{authorization::Bearer, Authorization},
|
||||
http::StatusCode,
|
||||
response::{IntoResponse, Response},
|
||||
routing::{get, post},
|
||||
Json, Router,
|
||||
};
|
||||
use headers::{authorization::Bearer, Authorization};
|
||||
use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header, Validation};
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
Reference in New Issue
Block a user