Close #1544 Document slashesDenoteHost flag in url.parse
This commit is contained in:
parent
8320af7ef3
commit
711a356468
@ -42,11 +42,17 @@ string will not be in the parsed object. Examples are shown for the URL
|
|||||||
|
|
||||||
The following methods are provided by the URL module:
|
The following methods are provided by the URL module:
|
||||||
|
|
||||||
### url.parse(urlStr, parseQueryString=false)
|
### url.parse(urlStr, parseQueryString=false, slashesDenoteHost=false)
|
||||||
|
|
||||||
Take a URL string, and return an object. Pass `true` as the second argument to also parse
|
Take a URL string, and return an object.
|
||||||
|
|
||||||
|
Pass `true` as the second argument to also parse
|
||||||
the query string using the `querystring` module.
|
the query string using the `querystring` module.
|
||||||
|
|
||||||
|
Pass `true` as the third argument to treat `//foo/bar` as
|
||||||
|
`{ host: 'foo', pathname: '/bar' }` rather than
|
||||||
|
`{ pathname: '//foo/bar' }`.
|
||||||
|
|
||||||
### url.format(urlObj)
|
### url.format(urlObj)
|
||||||
|
|
||||||
Take a parsed URL object, and return a formatted URL string.
|
Take a parsed URL object, and return a formatted URL string.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user