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
uri: &Uri - Entire request url is provided
uri: &Uri
Only path is provided
My handler:
#[handler] pub async fn test_get_url(uri: &Uri) -> Response { println!("Request uri: {}", uri); Response::builder() .status(StatusCode::OK) .header("Content-Type", "text/plain") .body("OK".to_string()) }
Request:
curl --request GET \ --url http://127.0.0.1:8000/xd/
print result:
Request uri: /xd/
The text was updated successfully, but these errors were encountered:
Maybe we don't have the information of the base url?
How about set to the server then the poem will auto combine them?
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
uri: &Uri
- Entire request url is providedActual Behavior
Only path is provided
Steps to Reproduce the Problem
My handler:
Request:
print result:
Request uri: /xd/
Specifications
The text was updated successfully, but these errors were encountered: