-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Request.uri() returns the Path instead of the full URL #2895
Labels
Comments
robjtede
added
B-semver-minor
A-web
project: actix-web
C-improvement
Category: an improvement to existing functionality
and removed
B-semver-minor
labels
Sep 27, 2022
From discord @robjtede:
|
18 tasks
This was referenced Oct 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Expected Behavior
I need the full URL in a response handler.
Request.uri()
should print the full URL (e.g.https://example.com/hello-world
).Current Behavior
Prints the path (
/hello-world
), which is not a valid URI.Possible Solution
Suggestion:
URI
struct should always be a valid URI, which means it must have a schema + host + origin.req.uri()
returns thepath
of the URI. I think a.path()
method is a better name for this. Add afull_uri()
method that returns the full URI.Steps to Reproduce (for bugs)
Your Environment
rustc -V
): rustc 1.63.0 (4b91a6ea7 2022-08-08)The text was updated successfully, but these errors were encountered: