parseUrl
parseUrl(
input): {hasCredentials:boolean;host:string;port:number|null;rest:string;scheme:string; } |null
Defined in: url.ts:28
scheme://[user@]host[:port][/path] → parts, or null. Hosts: DNS names, IPv4, bracketed IPv6.
A URL with a backslash, a tab, CR/LF or another control character anywhere is refused: a WHATWG parser
(browsers, Node, the extension) and OkHttp end the authority at \ and drop tab/CR/LF, so
https://192.168.1.1\x would be checked as one host and fetched from another (scan 2026-10-28 F12).
`` also ends the authority here, should the refusal ever be relaxed.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ hasCredentials: boolean; host: string; port: number | null; rest: string; scheme: string; } | null