summaryrefslogtreecommitdiff
path: root/doc/api/url.markdown
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-08-17 13:13:56 -0700
committerisaacs <i@izs.me>2011-08-17 13:43:09 -0700
commit711a356468da99d8f021cde6e6ca3ac92bd67c75 (patch)
tree8e48c68a41b170acae90b1f1a8ef4c20dc9cd62a /doc/api/url.markdown
parent8320af7ef370d8811d4a71bf094f3f432a72083c (diff)
downloadnode-new-711a356468da99d8f021cde6e6ca3ac92bd67c75.tar.gz
Close #1544 Document slashesDenoteHost flag in url.parse
Diffstat (limited to 'doc/api/url.markdown')
-rw-r--r--doc/api/url.markdown10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/api/url.markdown b/doc/api/url.markdown
index ac5b1444a3..428b51d901 100644
--- a/doc/api/url.markdown
+++ b/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.