Skip to content
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

Building URI with keyword arguments returns empty .uri field ("") #23

Open
SteadyGiant opened this issue Jul 17, 2020 · 0 comments
Open

Comments

@SteadyGiant
Copy link

Julia 1.4.2
HTTP.jl 0.8.16
MbedTLS.jl 1.0.2

When I pass scheme, host, and query arguments to HTTP.URI(), the returned object has no .uri field; rather, .uri equals "", an empty string. When I pass a string URL to HTTP.URI(), the returned object has a non-empty .uri field.

HTTP.URI(str) works as expected:

HTTP.URI("https://example.com").uri
# "https://example.com"

HTTP.URI(; scheme="", host="", port="", etc...) does not:

HTTP.URI(scheme="https", host="example.com").uri
# ""

Is this intended?

I'm fine doing the following to get what I want, but the above behavior just wasn't what I was expecting.

HTTP.URI(scheme="https", host="example.com") |> string
# "https://example.com"
@fredrikekre fredrikekre transferred this issue from JuliaWeb/HTTP.jl Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant