A configured base URL (baseUrl, --base-url): not blank, no surrounding
whitespace, a parseable http:/https: URL without a query or fragment.
Userinfo (https://user:pw@host/) is allowed; it is redacted from messages and sent
as Basic auth, so a % in it must start a valid escape (%25 for a literal one).
Surrounding whitespace is checked on the raw value: new URL() trims it
silently, but request paths are appended to the raw string, so
"https://h/2 " would request /2%20/version. A ? or # would swallow
every path: http://h/2?x=1 requests /2?x=1/version and http://h/2#f
requests /2.
A configured base URL (
baseUrl,--base-url): not blank, no surrounding whitespace, a parseablehttp:/https:URL without a query or fragment. Userinfo (https://user:pw@host/) is allowed; it is redacted from messages and sent as Basic auth, so a%in it must start a valid escape (%25for a literal one).Surrounding whitespace is checked on the raw value:
new URL()trims it silently, but request paths are appended to the raw string, so"https://h/2 "would request/2%20/version. A?or#would swallow every path:http://h/2?x=1requests/2?x=1/versionandhttp://h/2#frequests/2.