We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
little bit more information:
If you run an axum server with following code:
use axum::{body::Body, http::Request, routing, Router}; async fn get(req: Request<Body>) { println!("{}", req.uri()); } #[tokio::main] async fn main() { let api = Router::new().route("/health", routing::get(get)); let router = Router::new().nest("/api", api); axum::Server::bind(&"0.0.0.0:3030".parse().unwrap()) .serve(router.into_make_service()) .await .unwrap(); }
and request to localhost:3030/api/health?foo=bar, output is like:
localhost:3030/api/health?foo=bar
/health?foo=bar
When we use nested router, axum's req.uri only shows matched path of the nested router.
req.uri
Sorry, something went wrong.
We can use MatchedPath to retrieve full path, but we have to somehow concatenate the query string.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: