Browse Source

Close #1544 Document slashesDenoteHost flag in url.parse

v0.7.4-release
isaacs 14 years ago
parent
commit
711a356468
  1. 10
      doc/api/url.markdown

10
doc/api/url.markdown

@ -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.

Loading…
Cancel
Save