Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
add more detail to req.uri documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Jun 26, 2009
1 parent 5ab9350 commit be963d6
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions website/api.html
Expand Up @@ -664,7 +664,24 @@ <h3 id="http_server_request"><code>node.http.ServerRequest</code></h3>
</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>
Expand All @@ -678,11 +695,7 @@ <h3 id="http_server_request"><code>node.http.ServerRequest</code></h3>
<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>
Expand Down

0 comments on commit be963d6

Please sign in to comment.