URIs.jl
URIs.jl copied to clipboard
Building URI with keyword arguments returns empty `.uri` field ("")
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"