A base URL must be an absolute http(s) URL. The default transport already gates
the scheme per hop, but the engine is exported as a library and may be handed a
custom transport that does no such check, so the configured base URL is checked
up front too (a file:/ftp: base URL fails fast). A backslash is rejected (WHATWG ends an
http(s) host at one, text-based code reads on), and so is a scheme not followed by exactly
// and the host (http:host, http:/host, http:///host, which WHATWG repairs silently
into another URL than the one typed). A user name or password in it is rejected as well (the
API needs none; the reason never repeats them, nor a user name that a value without a scheme
puts where the scheme would be). The reasons match the CLI's --base-url parser, which
calls this rule.
A base URL must be an absolute http(s) URL. The default transport already gates the scheme per hop, but the engine is exported as a library and may be handed a custom transport that does no such check, so the configured base URL is checked up front too (a
file:/ftp:base URL fails fast). A backslash is rejected (WHATWG ends an http(s) host at one, text-based code reads on), and so is a scheme not followed by exactly//and the host (http:host,http:/host,http:///host, which WHATWG repairs silently into another URL than the one typed). A user name or password in it is rejected as well (the API needs none; the reason never repeats them, nor a user name that a value without a scheme puts where the scheme would be). The reasons match the CLI's--base-urlparser, which calls this rule.