Close #1544 Document slashesDenoteHost flag in url.parse

This commit is contained in:
isaacs 2011-08-17 13:13:56 -07:00
parent 8320af7ef3
commit 711a356468

View File

@ -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:
### 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.
Pass `true` as the third argument to treat `//foo/bar` as
`{ host: 'foo', pathname: '/bar' }` rather than
`{ pathname: '//foo/bar' }`.
### url.format(urlObj)
Take a parsed URL object, and return a formatted URL string.