Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/api.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/website/api.html b/website/api.html
index 3290ae9d9b1..fbbdb43fa8f 100644
--- a/website/api.html
+++ b/website/api.html
@@ -622,7 +622,7 @@ server.listen(7000, "localhost");</pre>
<code>"1.1"</code>, <code>"1.0"</code>
</dd>
- <dt><code>req.onBody</code></dt>
+ <dt><code>req.onBody = function (chunk) { }; </code></dt>
<dd>
Callback. Should be set by the user to be informed of when a
piece of the message body is received. Example:
@@ -640,7 +640,7 @@ req.onBody = function (chunk) {
</p>
</dd>
- <dt><code>req.onBodyComplete</code></dt>
+ <dt><code>req.onBodyComplete = function () { };</code></dt>
<dd>
Callback. Made exactly once for each message. No arguments.
After <code>onBodyComplete</code> is executed
@@ -652,6 +652,14 @@ req.onBody = function (chunk) {
Set the encoding for the request body. Either <code>"utf8"</code>
or <code>"raw"</code>. Defaults to raw.
</dd>
+
+ <dt><code>req.interrupt()</code></dt>
+ <dd>
+ Interrupt the request. You will not receive anymore callbacks.
+ This is useful if, for example someone is streaming up a file but it
+ is too large and neesd to be stopped. The connection to the client
+ will be closed immediately.
+ </dd>
</dl>
<h3 id="http_server_response"><code>node.http.ServerResponse</code></h3>