From be963d68af4b22368a037cf490aff6898b238b92 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 27 Jun 2009 00:43:03 +0200 Subject: [PATCH] add more detail to req.uri documentation --- website/api.html | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/website/api.html b/website/api.html index bd89007a2e..f22c3aeccb 100644 --- a/website/api.html +++ b/website/api.html @@ -664,7 +664,24 @@ server.listen(7000, "localhost");
req.uri
-
Request URI. (Object.)
+
Request URI Object. This contains only the parameters that are + present in the actual http request. That is, if the request is +
GET /status?name=ryan HTTP/1.1\r\n
+Accept: */*\r\n
+\r\n
+
+ Then req.uri will be +
+{ path: "/status", 
+  file: "status", 
+  directory: "/", 
+  params: { "name" : "ryan" } 
+}
+ In particular, note that req.uri.protocol is + undefined. This is because there was no URI protocol given + in the actual HTTP Request. +
+
req.uri.anchor
req.uri.query
req.uri.file
@@ -678,11 +695,7 @@ server.listen(7000, "localhost");
req.uri.authority
req.uri.protocol
req.uri.params
-
- req.uri.toString(), - req.uri.source -
-
The original URI found in the status line.
+
req.uri.toString(), req.uri.source
req.headers