Skip to content

get current router in middleware #1058

Answered by davidpdrsn
tingfeng-key asked this question in Q&A
Discussion options

You must be logged in to vote

You can extract either Uri:

async fn handle(uri: axum::http::Uri) {}

Or MatchedPath:

async fn handle(uri: axum::extract::MatchedPath) {}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tingfeng-key
Comment options

@davidpdrsn
Comment options

@tingfeng-key
Comment options

Answer selected by tingfeng-key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants