summaryrefslogtreecommitdiff
path: root/doc/api/url.md
diff options
context:
space:
mode:
authorSteven <steven@ceriously.com>2017-04-05 11:22:10 -0400
committerTimothy Gu <timothygu99@gmail.com>2017-04-07 09:06:54 -0700
commit9acd6c9aef399dbafa8a57399fbbb45376d7a81b (patch)
treef9258307978ae22286e0e3e3ad75420fff82da5a /doc/api/url.md
parent84602845c6f2a015b7b214751543d0793e45a5a9 (diff)
downloadandroid-node-v8-9acd6c9aef399dbafa8a57399fbbb45376d7a81b.tar.gz
android-node-v8-9acd6c9aef399dbafa8a57399fbbb45376d7a81b.tar.bz2
android-node-v8-9acd6c9aef399dbafa8a57399fbbb45376d7a81b.zip
doc: add sub domain to host in url
PR-URL: https://github.com/nodejs/node/pull/12233 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/url.md')
-rw-r--r--doc/api/url.md66
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/api/url.md b/doc/api/url.md
index 54c6fbdaf2..14fcf267ce 100644
--- a/doc/api/url.md
+++ b/doc/api/url.md
@@ -16,21 +16,21 @@ When parsed, a URL object is returned containing properties for each of these
components.
The following details each of the components of a parsed URL. The example
-`'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'` is used to
+`'http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'` is used to
illustrate each.
```txt
-┌─────────────────────────────────────────────────────────────────────────────┐
-│ href │
-├──────────┬┬───────────┬─────────────────┬───────────────────────────┬───────┤
-│ protocol ││ auth │ host │ path │ hash │
-│ ││ ├──────────┬──────┼──────────┬────────────────┤ │
-│ ││ │ hostname │ port │ pathname │ search │ │
-│ ││ │ │ │ ├─┬──────────────┤ │
-│ ││ │ │ │ │ │ query │ │
-" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
-│ ││ │ │ │ │ │ │ │
-└──────────┴┴───────────┴──────────┴──────┴──────────┴─┴──────────────┴───────┘
+┌─────────────────────────────────────────────────────────────────────────────────┐
+│ href │
+├──────────┬┬───────────┬─────────────────────┬───────────────────────────┬───────┤
+│ protocol ││ auth │ host │ path │ hash │
+│ ││ ├──────────────┬──────┼──────────┬────────────────┤ │
+│ ││ │ hostname │ port │ pathname │ search │ │
+│ ││ │ │ │ ├─┬──────────────┤ │
+│ ││ │ │ │ │ │ query │ │
+" http: // user:pass @ sub.host.com : 8080 /p/a/t/h ? query=string #hash "
+│ ││ │ │ │ │ │ │ │
+└──────────┴┴───────────┴──────────────┴──────┴──────────┴─┴──────────────┴───────┘
(all spaces in the "" line should be ignored -- they are purely for formatting)
```
@@ -56,21 +56,21 @@ For example: `'#hash'`
The `host` property is the full lower-cased host portion of the URL, including
the `port` if specified.
-For example: `'host.com:8080'`
+For example: `'sub.host.com:8080'`
### urlObject.hostname
The `hostname` property is the lower-cased host name portion of the `host`
component *without* the `port` included.
-For example: `'host.com'`
+For example: `'sub.host.com'`
### urlObject.href
The `href` property is the full URL string that was parsed with both the
`protocol` and `host` components converted to lower-case.
-For example: `'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'`
+For example: `'http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'`
### urlObject.path
@@ -328,7 +328,7 @@ console.log(myURL.pathname); // /foo
`delete myURL.pathname`, etc) has no effect but will still return `true`.
A comparison between this API and `url.parse()` is given below. Above the URL
-`'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'`, properties of an
+`'http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'`, properties of an
object returned by `url.parse()` are shown. Below it are properties of a WHATWG
`URL` object.
@@ -336,23 +336,23 @@ object returned by `url.parse()` are shown. Below it are properties of a WHATWG
`username` or `password`.
```txt
-┌─────────────────────────────────────────────────────────────────────────────────────────┐
-│ href │
-├──────────┬──┬─────────────────────┬─────────────────┬───────────────────────────┬───────┤
-│ protocol │ │ auth │ host │ path │ hash │
-│ │ │ ├──────────┬──────┼──────────┬────────────────┤ │
-│ │ │ │ hostname │ port │ pathname │ search │ │
-│ │ │ │ │ │ ├─┬──────────────┤ │
-│ │ │ │ │ │ │ │ query │ │
-" http: // user : pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
-│ │ │ │ │ hostname │ port │ │ │ │
-│ │ │ │ ├──────────┴──────┤ │ │ │
-│ protocol │ │ username │ password │ host │ │ │ │
-├──────────┴──┼──────────┴──────────┼─────────────────┤ │ │ │
-│ origin │ │ origin │ pathname │ search │ hash │
-├─────────────┴─────────────────────┴─────────────────┴──────────┴────────────────┴───────┤
-│ href │
-└─────────────────────────────────────────────────────────────────────────────────────────┘
+┌─────────────────────────────────────────────────────────────────────────────────────────────┐
+│ href │
+├──────────┬──┬─────────────────────┬─────────────────────┬───────────────────────────┬───────┤
+│ protocol │ │ auth │ host │ path │ hash │
+│ │ │ ├──────────────┬──────┼──────────┬────────────────┤ │
+│ │ │ │ hostname │ port │ pathname │ search │ │
+│ │ │ │ │ │ ├─┬──────────────┤ │
+│ │ │ │ │ │ │ │ query │ │
+" http: // user : pass @ sub.host.com : 8080 /p/a/t/h ? query=string #hash "
+│ │ │ │ │ hostname │ port │ │ │ │
+│ │ │ │ ├──────────────┴──────┤ │ │ │
+│ protocol │ │ username │ password │ host │ │ │ │
+├──────────┴──┼──────────┴──────────┼─────────────────────┤ │ │ │
+│ origin │ │ origin │ pathname │ search │ hash │
+├─────────────┴─────────────────────┴─────────────────────┴──────────┴────────────────┴───────┤
+│ href │
+└─────────────────────────────────────────────────────────────────────────────────────────────┘
(all spaces in the "" line should be ignored -- they are purely for formatting)
```