diff options
author | Ryan <ry@tinyclouds.org> | 2009-06-27 00:43:03 +0200 |
---|---|---|
committer | Ryan <ry@tinyclouds.org> | 2009-06-27 00:43:03 +0200 |
commit | be963d68af4b22368a037cf490aff6898b238b92 (patch) | |
tree | 087b23a22c337b1ce5c9bb8af3f4146521c5bc6c /website | |
parent | 5ab93502d04657a0fdc08814970d875312912280 (diff) | |
download | nodejs-be963d68af4b22368a037cf490aff6898b238b92.tar.gz nodejs-be963d68af4b22368a037cf490aff6898b238b92.tar.bz2 nodejs-be963d68af4b22368a037cf490aff6898b238b92.zip |
add more detail to req.uri documentation
Diffstat (limited to 'website')
-rw-r--r-- | website/api.html | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/website/api.html b/website/api.html index bd89007a2..f22c3aecc 100644 --- a/website/api.html +++ b/website/api.html @@ -664,7 +664,24 @@ server.listen(7000, "localhost");</pre> </dd> <dt><code>req.uri</code></dt> - <dd> Request URI. (Object.)</dd> + <dd> Request URI Object. This contains only the parameters that are + present in the actual http request. That is, if the request is +<pre class="sh_none">GET /status?name=ryan HTTP/1.1\r\n +Accept: */*\r\n +\r\n +</pre> + Then <code>req.uri</code> will be +<pre> +{ path: "/status", + file: "status", + directory: "/", + params: { "name" : "ryan" } +}</pre> + In particular, note that <code>req.uri.protocol</code> is + <code>undefined</code>. This is because there was no URI protocol given + in the actual HTTP Request. + </dd> + <dt><code>req.uri.anchor</code></dt> <dt><code>req.uri.query</code></dt> <dt><code>req.uri.file</code></dt> @@ -678,11 +695,7 @@ server.listen(7000, "localhost");</pre> <dt><code>req.uri.authority</code></dt> <dt><code>req.uri.protocol</code></dt> <dt><code>req.uri.params</code></dt> - <dt> - <code>req.uri.toString()</code>, - <code>req.uri.source</code> - </dt> - <dd>The original URI found in the status line.</dd> + <dt><code>req.uri.toString()</code>, <code>req.uri.source</code> </dt> <dt><code>req.headers</code></dt> <dd> |