diff --git a/website/node.html b/website/node.html index c7464ac114..b2b50c0595 100644 --- a/website/node.html +++ b/website/node.html @@ -17,6 +17,8 @@ body { top: 2em; left: 0; width: 10em; + font-size: 14pt; + line-height: 120%; } #toc ol { list-style: none; @@ -28,7 +30,7 @@ body { margin: 0; padding: 0; } -#toc a { color: #777; } +#toc a { color: #aaa; } h1, h2, h3, h4 { color: #B0C4DE; @@ -84,12 +86,22 @@ a:hover { text-decoration: underline; }
Conventions: Callbacks are object members which are prefixed with
on
. All methods and members are camel cased. Constructors
@@ -279,7 +291,6 @@ req.onBody = function (chunk) {
"utf8"
or
"raw"
. Defaults to raw.
- TODO
node.http.ServerResponse
node.http.ClientRequest
This object created internally and returned from the request methods of a
+node.http.Client
. It represents an in-progress request
+whose header has already been sent.
+
+
req.sendBody(chunk, encoding)
["Transfer-Encoding",
+"chunked"]
header line when creating the request.
+
+ The chunk
argument should be an array of integers or a string.
+
+
The encoding
argument is optional and only applies when
+ chunk
is a string. The encoding argument should be either
+ "utf8"
or "ascii"
. By default the body uses ASCII
+ encoding, as it is faster.
+
+
TODO + +
req.finish(response_handler)
"0\r\n\r\n"
.
+
+ The parameter response_handler
is a user-supplied callback which will
+ be executed exactly once when the server response headers have been received.
+ The response_handler
callback is executed with one argument: a
+ ClientResponse
object.
+
node.http.ClientResponse
This object is created internally and passed to the
+response_handler
callback (is given to the client in
+req.finish
function). The response object appears exactly as the
+header is completely received but before any part of the response body has been
+read.
+
+
res.status_code
404
.)res.http_version
"1.1"
or
+ "1.0"
.
+ res.headers
res.onBody
The body chunk is either a String
in the case of UTF-8
+ encoding or an array of numbers in the case of raw encoding. The body
+ encoding is set with res.setBodyEncoding()
.
+
+
res.onBodyComplete
onBodyComplete
is executed
+ onBody
will no longer be called.
+ res.setBodyEncoding(encoding)
"utf8"
or
+ "raw"
. Defaults to raw.
+ Node has a simple module loading system. In Node, files and modules are diff --git a/website/sh_vim-dark.css b/website/sh_vim-dark.css index 7f3291da90..6b7a1c95f5 100644 --- a/website/sh_vim-dark.css +++ b/website/sh_vim-dark.css @@ -12,7 +12,8 @@ font-style: italic; } -.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number +.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number, +.sh_sourceCode .sh_specialchar { color: #B0C4DE; }