>>>>> On Tue, 26 Jan 2016 08:07:30 -0500, Josef Sachs said:
> Is there a way to use Requests.jl with HTTP Basic Authentication
> when the password contains a slash?
> julia> using Requests
> julia> get("https://user:pass/[email protected]")
> ERROR: Port must be numeric (decimal)
> in parse_authority at /home/sachs/.julia/v0.4/URIParser/src/parser.jl:129
> in parse_url at /home/sachs/.julia/v0.4/URIParser/src/parser.jl:291
> in get at /home/sachs/.julia/v0.4/Requests/src/Requests.jl:394
> I tried RFC 3986 percent-encoding the password, which turns the slash
> into %2F, but I get
> Response(401 Unauthorized, 9 headers, 161 bytes in body)
> Any help is appreciated.
Keith Mason pointed out to me that I can pass get() a URI instead of
a string, and that works.
get(URI("http","google.com",80,"","","","user:pass/word"))
# Only necessary for a URL that requires authentication;
# google.com only used as an example.
# Note that the password "pass/word" contains a slash.
# When sending a password, use HTTPS, not HTTP.