The URL string to parse.
Optional
slashesDenoteHost: booleanOptional
slashesDenoteHost: booleanOptional
slashesDenoteHost: booleanThe url.parse()
method takes a URL string, parses it, and returns a URL
object.
A TypeError
is thrown if urlString
is not a string.
A URIError
is thrown if the auth
property is present but cannot be decoded.
Use of the legacy url.parse()
method is discouraged. Users should
use the WHATWG URL
API. Because the url.parse()
method uses a
lenient, non-standard algorithm for parsing URL strings, security
issues can be introduced. Specifically, issues with host name spoofing and
incorrect handling of usernames and passwords have been identified.
Deprecation of this API has been shelved for now primarily due to the the inability of the WHATWG API to parse relative URLs. Discussions are ongoing for the best way to resolve this.
v0.1.25
The URL string to parse.
Optional
slashesDenoteHost: booleanOptional
slashesDenoteHost: booleanOptional
slashesDenoteHost: booleanGenerated using TypeDoc
The
url.parse()
method takes a URL string, parses it, and returns a URL object.A
TypeError
is thrown ifurlString
is not a string.A
URIError
is thrown if theauth
property is present but cannot be decoded.Use of the legacy
url.parse()
method is discouraged. Users should use the WHATWGURL
API. Because theurl.parse()
method uses a lenient, non-standard algorithm for parsing URL strings, security issues can be introduced. Specifically, issues with host name spoofing and incorrect handling of usernames and passwords have been identified.Deprecation of this API has been shelved for now primarily due to the the inability of the WHATWG API to parse relative URLs. Discussions are ongoing for the best way to resolve this.
Since
v0.1.25