Browse Source

Clean up some text in documentation.

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
1ae69a68a4
  1. 83
      doc/api.html
  2. 101
      doc/api.txt
  3. 81
      doc/api.xml
  4. 14
      doc/node.1

83
doc/api.html

@ -240,8 +240,8 @@ on error: exit code, stdout buffer, stderr buffer
<div class="paragraph"><p>Many objects in Node emit events: a TCP server emits an event each time
there is a connection, a child process emits an event when it exits. All
objects which emit events are are instances of <tt>node.EventEmitter</tt>.</p></div>
<div class="paragraph"><p>Events are represented by a snakecased string. Here are some examples:
<tt>"connection"</tt>, <tt>"receive"</tt>, <tt>"message_begin"</tt>.</p></div>
<div class="paragraph"><p>Events are represented by a camel-cased string. Here are some examples:
<tt>"connection"</tt>, <tt>"receive"</tt>, <tt>"messageBegin"</tt>.</p></div>
<div class="paragraph"><p>Functions can be then be attached to objects, to be executed when an event
is emitted. These functions are called <em>listeners</em>.</p></div>
<div class="paragraph"><p>Some asynchronous file operations return an <tt>EventEmitter</tt> called a
@ -588,8 +588,8 @@ cellspacing="0" cellpadding="4">
<col width="76%" />
<thead>
<tr>
<th align="left" valign="top">Event </th>
<th align="left" valign="top">Parameters </th>
<th align="left" valign="top"> Event </th>
<th align="left" valign="top"> Parameters </th>
<th align="left" valign="top">Notes</th>
</tr>
</thead>
@ -597,22 +597,27 @@ cellspacing="0" cellpadding="4">
<tr>
<td align="left" valign="top"><p class="table"><tt>"output"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>data</tt></p></td>
<td align="left" valign="top"><p class="table">Each time the child process sends data to its <tt>stdout</tt>, this event is
emitted. <tt>data</tt> is a string.<br />
If the child process closes its <tt>stdout</tt> stream (a common thing to do on
exit), this event will be emitted with <tt>data === null</tt>.</p></td>
<td align="left" valign="top"><p class="table">Each time the child process
sends data to its <tt>stdout</tt>, this event is
emitted. <tt>data</tt> is a string. + If the child
process closes its <tt>stdout</tt> stream (a common
thing to do on exit), this event will be emitted
with <tt>data === null</tt>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>"error"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>data</tt></p></td>
<td align="left" valign="top"><p class="table">Identical to the <tt>"output"</tt> event except for <tt>stderr</tt> instead of <tt>stdout</tt>.</p></td>
<td align="left" valign="top"><p class="table">Identical to the <tt>"output"</tt> event except for
<tt>stderr</tt> instead of <tt>stdout</tt>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>"exit"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>code</tt></p></td>
<td align="left" valign="top"><p class="table">This event is emitted after the child process ends. <tt>code</tt> is the final exit
code of the process. One can be assured that after this event is emitted
that the <tt>"output"</tt> and <tt>"error"</tt> callbacks will no longer be made.</p></td>
<td align="left" valign="top"><p class="table">This event is emitted after the child process
ends. <tt>code</tt> is the final exit code of the
process. One can be assured that after this
event is emitted that the <tt>"output"</tt> and
<tt>"error"</tt> callbacks will no longer be made.</p></td>
</tr>
</tbody>
</table>
@ -999,9 +1004,7 @@ user is able to stream data.</p></div>
<div class="paragraph"><p>In order to support the full spectrum of possible HTTP applications, Node&#8217;s
HTTP API is very low-level. It deals with connection handling and message
parsing only. It parses a message into headers and body but it does not
parse the actual headers or the body. That means, for example, that Node
does not, and will never, provide API to access or manipulate Cookies or
multi-part bodies. <em>This is left to the user.</em></p></div>
parse the actual headers or the body.</p></div>
<h4 id="_tt_http_server_tt"><tt>http.Server</tt></h4>
<div class="tableblock">
<table rules="all"
@ -1014,7 +1017,7 @@ cellspacing="0" cellpadding="4">
<thead>
<tr>
<th align="left" valign="top">Event </th>
<th align="left" valign="top"> Parameters </th>
<th align="left" valign="top"> Parameters </th>
<th align="left" valign="top"> Notes</th>
</tr>
</thead>
@ -1022,24 +1025,27 @@ cellspacing="0" cellpadding="4">
<tr>
<td align="left" valign="top"><p class="table"><tt>"request"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>request, response</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>request</tt> is an instance of <tt>http.ServerRequest</tt><br />
<tt>response</tt> is an instance of <tt>http.ServerResponse</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>request</tt> is an instance of <tt>http.ServerRequest</tt>
<br />
<tt>response</tt> is an instance of <tt>http.ServerResponse</tt></p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>"connection"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>connection</tt></p></td>
<td align="left" valign="top"><p class="table">When a new TCP connection is established.
<tt>connection</tt> is an object of type <tt>http.Connection</tt>. Usually users will not
want to access this event. The <tt>connection</tt> can also be accessed at
<tt>request.connection</tt>.</p></td>
<tt>connection</tt> is an object of type
<tt>http.Connection</tt>. Usually users
will not want to access this event.
The <tt>connection</tt> can also be
accessed at <tt>request.connection</tt>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>"close"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>errorno</tt></p></td>
<td align="left" valign="top"><p class="table">Emitted when the server closes. <tt>errorno</tt>
is an integer which indicates what, if any,
error caused the server to close. If no
error occured <tt>errorno</tt> will be 0.</p></td>
is an integer which indicates what, if any,
error caused the server to close. If no
error occured <tt>errorno</tt> will be 0.</p></td>
</tr>
</tbody>
</table>
@ -1099,16 +1105,20 @@ cellspacing="0" cellpadding="4">
<tr>
<td align="left" valign="top"><p class="table"><tt>"body"</tt></p></td>
<td align="left" valign="top"><p class="table"><tt>chunk</tt></p></td>
<td align="left" valign="top"><p class="table">Emitted when a piece of the message body is received. Example: A chunk of
the body is given as the single argument. The transfer-encoding has been
decoded. The body chunk is a String. The body encoding is set
with <tt>request.setBodyEncoding()</tt>.</p></td>
<td align="left" valign="top"><p class="table">Emitted when a piece of the
message body is received. Example: A chunk
of the body is given as the single
argument. The transfer-encoding has been
decoded. The body chunk is a String. The
body encoding is set with
<tt>request.setBodyEncoding()</tt>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>"complete"</tt></p></td>
<td align="left" valign="top"><p class="table"></p></td>
<td align="left" valign="top"><p class="table">Emitted exactly once for each message. No arguments.
After emitted no other events will be emitted on the request.</p></td>
<td align="left" valign="top"><p class="table">(none)</p></td>
<td align="left" valign="top"><p class="table">Emitted exactly once for each message.
No arguments. After emitted no other
events will be emitted on the request.</p></td>
</tr>
</tbody>
</table>
@ -1134,7 +1144,7 @@ present in the actual HTTP request. That is, if the request is
<div class="listingblock">
<div class="content">
<pre><tt>GET /status?name=ryan HTTP/1.1\r\n
Accept: */*\r\n
Accept: text/plain\r\n
\r\n</tt></pre>
</div></div>
<div class="paragraph"><p>Then <tt>request.uri</tt> will be</p></div>
@ -1149,7 +1159,12 @@ Accept: */*\r\n
<div class="paragraph"><p>In particular, note that <tt>request.uri.protocol</tt> is
<tt>undefined</tt>. This is because there was no URI protocol given
in the actual HTTP Request.</p></div>
<div class="paragraph"><p><tt>request.uri.anchor</tt>, <tt>request.uri.query</tt>, <tt>request.uri.file</tt>, <tt>request.uri.directory</tt>, <tt>request.uri.path</tt>, <tt>request.uri.relative</tt>, <tt>request.uri.port</tt>, <tt>request.uri.host</tt>, <tt>request.uri.password</tt>, <tt>request.uri.user</tt>, <tt>request.uri.authority</tt>, <tt>request.uri.protocol</tt>, <tt>request.uri.params</tt>, <tt>request.uri.toString()</tt>, <tt>request.uri.source</tt></p></div>
<div class="paragraph"><p>Here is what&#8217;s available: <tt>request.uri.anchor</tt>, <tt>request.uri.query</tt>,
<tt>request.uri.file</tt>, <tt>request.uri.directory</tt>, <tt>request.uri.path</tt>,
<tt>request.uri.relative</tt>, <tt>request.uri.port</tt>, <tt>request.uri.host</tt>,
<tt>request.uri.password</tt>, <tt>request.uri.user</tt>, <tt>request.uri.authority</tt>,
<tt>request.uri.protocol</tt>, <tt>request.uri.params</tt>, <tt>request.uri.toString()</tt>,
<tt>request.uri.source</tt></p></div>
</dd>
<dt class="hdlist1">
<tt>request.headers</tt>
@ -2015,7 +2030,7 @@ init (Handle&lt;Object&gt; target)
<div id="footer">
<div id="footer-text">
Version 0.1.12<br />
Last updated 2009-09-28 21:50:11 CEST
Last updated 2009-09-29 09:59:52 CEST
</div>
</div>
</body>

101
doc/api.txt

@ -136,8 +136,8 @@ Many objects in Node emit events: a TCP server emits an event each time
there is a connection, a child process emits an event when it exits. All
objects which emit events are are instances of +node.EventEmitter+.
Events are represented by a snakecased string. Here are some examples:
+"connection"+, +"receive"+, +"message_begin"+.
Events are represented by a camel-cased string. Here are some examples:
+"connection"+, +"receive"+, +"messageBegin"+.
Functions can be then be attached to objects, to be executed when an event
is emitted. These functions are called _listeners_.
@ -368,24 +368,23 @@ Node provides a tridirectional +popen(3)+ facility through the class
[cols="1,2,10",options="header"]
|=========================================================
|Event |Parameters |Notes
|+"output"+ | +data+ |
Each time the child process sends data to its +stdout+, this event is
emitted. +data+ is a string.
+
If the child process closes its +stdout+ stream (a common thing to do on
exit), this event will be emitted with +data === null+.
|+"error"+ | +data+ |
Identical to the +"output"+ event except for +stderr+ instead of +stdout+.
|+"exit"+ | +code+ |
This event is emitted after the child process ends. +code+ is the final exit
code of the process. One can be assured that after this event is emitted
that the +"output"+ and +"error"+ callbacks will no longer be made.
| Event | Parameters |Notes
| +"output"+ | +data+ | Each time the child process
sends data to its +stdout+, this event is
emitted. +data+ is a string. + If the child
process closes its +stdout+ stream (a common
thing to do on exit), this event will be emitted
with +data === null+.
| +"error"+ | +data+ | Identical to the +"output"+ event except for
+stderr+ instead of +stdout+.
| +"exit"+ | +code+ | This event is emitted after the child process
ends. +code+ is the final exit code of the
process. One can be assured that after this
event is emitted that the +"output"+ and
+"error"+ callbacks will no longer be made.
|=========================================================
+node.createChildProcess(command)+::
@ -594,32 +593,30 @@ HTTP message headers are represented by an object like this
In order to support the full spectrum of possible HTTP applications, Node's
HTTP API is very low-level. It deals with connection handling and message
parsing only. It parses a message into headers and body but it does not
parse the actual headers or the body. That means, for example, that Node
does not, and will never, provide API to access or manipulate Cookies or
multi-part bodies. _This is left to the user._
parse the actual headers or the body.
==== +http.Server+
[cols="1,2,10",options="header"]
|=========================================================
|Event | Parameters | Notes
|Event | Parameters | Notes
|+"request"+ | +request, response+ |
+request+ is an instance of +http.ServerRequest+
+
+response+ is an instance of +http.ServerResponse+
|+"request"+ | +request, response+ | +request+ is an instance of +http.ServerRequest+
+
+response+ is an instance of +http.ServerResponse+
|+"connection"+ | +connection+ |
When a new TCP connection is established.
+connection+ is an object of type +http.Connection+. Usually users will not
want to access this event. The +connection+ can also be accessed at
+request.connection+.
|+"connection"+ | +connection+ | When a new TCP connection is established.
+connection+ is an object of type
+http.Connection+. Usually users
will not want to access this event.
The +connection+ can also be
accessed at +request.connection+.
|+"close"+ | +errorno+ | Emitted when the server closes. +errorno+
is an integer which indicates what, if any,
error caused the server to close. If no
error occured +errorno+ will be 0.
|+"close"+ | +errorno+ | Emitted when the server closes. +errorno+
is an integer which indicates what, if any,
error caused the server to close. If no
error occured +errorno+ will be 0.
|=========================================================
@ -652,16 +649,17 @@ the user--and passed as the first argument to a +"request"+ listener.
|=========================================================
|Event | Parameters | Notes
|+"body"+ | +chunk+ |
Emitted when a piece of the message body is received. Example: A chunk of
the body is given as the single argument. The transfer-encoding has been
decoded. The body chunk is a String. The body encoding is set
with +request.setBodyEncoding()+.
|+"complete"+ | |
Emitted exactly once for each message. No arguments.
After emitted no other events will be emitted on the request.
|+"body"+ | +chunk+ | Emitted when a piece of the
message body is received. Example: A chunk
of the body is given as the single
argument. The transfer-encoding has been
decoded. The body chunk is a String. The
body encoding is set with
+request.setBodyEncoding()+.
|+"complete"+ | (none) | Emitted exactly once for each message.
No arguments. After emitted no other
events will be emitted on the request.
|=========================================================
+request.method+ ::
@ -675,7 +673,7 @@ present in the actual HTTP request. That is, if the request is
+
----------------------------------------
GET /status?name=ryan HTTP/1.1\r\n
Accept: */*\r\n
Accept: text/plain\r\n
\r\n
----------------------------------------
+
@ -693,7 +691,12 @@ In particular, note that +request.uri.protocol+ is
+undefined+. This is because there was no URI protocol given
in the actual HTTP Request.
+
+request.uri.anchor+, +request.uri.query+, +request.uri.file+, +request.uri.directory+, +request.uri.path+, +request.uri.relative+, +request.uri.port+, +request.uri.host+, +request.uri.password+, +request.uri.user+, +request.uri.authority+, +request.uri.protocol+, +request.uri.params+, +request.uri.toString()+, +request.uri.source+
Here is what's available: +request.uri.anchor+, +request.uri.query+,
+request.uri.file+, +request.uri.directory+, +request.uri.path+,
+request.uri.relative+, +request.uri.port+, +request.uri.host+,
+request.uri.password+, +request.uri.user+, +request.uri.authority+,
+request.uri.protocol+, +request.uri.params+, +request.uri.toString()+,
+request.uri.source+
+request.headers+ ::

81
doc/api.xml

@ -242,8 +242,8 @@ on error: exit code, stdout buffer, stderr buffer
<simpara>Many objects in Node emit events: a TCP server emits an event each time
there is a connection, a child process emits an event when it exits. All
objects which emit events are are instances of <literal>node.EventEmitter</literal>.</simpara>
<simpara>Events are represented by a snakecased string. Here are some examples:
<literal>"connection"</literal>, <literal>"receive"</literal>, <literal>"message_begin"</literal>.</simpara>
<simpara>Events are represented by a camel-cased string. Here are some examples:
<literal>"connection"</literal>, <literal>"receive"</literal>, <literal>"messageBegin"</literal>.</simpara>
<simpara>Functions can be then be attached to objects, to be executed when an event
is emitted. These functions are called <emphasis>listeners</emphasis>.</simpara>
<simpara>Some asynchronous file operations return an <literal>EventEmitter</literal> called a
@ -620,8 +620,8 @@ rowsep="1" colsep="1"
<colspec colname="col_3" colwidth="76*"/>
<thead>
<row>
<entry align="left" valign="top">Event </entry>
<entry align="left" valign="top">Parameters </entry>
<entry align="left" valign="top"> Event </entry>
<entry align="left" valign="top"> Parameters </entry>
<entry align="left" valign="top">Notes</entry>
</row>
</thead>
@ -629,22 +629,27 @@ rowsep="1" colsep="1"
<row>
<entry align="left" valign="top"><simpara><literal>"output"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>data</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Each time the child process sends data to its <literal>stdout</literal>, this event is
emitted. <literal>data</literal> is a string.<?asciidoc-br?>
If the child process closes its <literal>stdout</literal> stream (a common thing to do on
exit), this event will be emitted with <literal>data === null</literal>.</simpara></entry>
<entry align="left" valign="top"><simpara>Each time the child process
sends data to its <literal>stdout</literal>, this event is
emitted. <literal>data</literal> is a string. + If the child
process closes its <literal>stdout</literal> stream (a common
thing to do on exit), this event will be emitted
with <literal>data === null</literal>.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><literal>"error"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>data</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Identical to the <literal>"output"</literal> event except for <literal>stderr</literal> instead of <literal>stdout</literal>.</simpara></entry>
<entry align="left" valign="top"><simpara>Identical to the <literal>"output"</literal> event except for
<literal>stderr</literal> instead of <literal>stdout</literal>.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><literal>"exit"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>code</literal></simpara></entry>
<entry align="left" valign="top"><simpara>This event is emitted after the child process ends. <literal>code</literal> is the final exit
code of the process. One can be assured that after this event is emitted
that the <literal>"output"</literal> and <literal>"error"</literal> callbacks will no longer be made.</simpara></entry>
<entry align="left" valign="top"><simpara>This event is emitted after the child process
ends. <literal>code</literal> is the final exit code of the
process. One can be assured that after this
event is emitted that the <literal>"output"</literal> and
<literal>"error"</literal> callbacks will no longer be made.</simpara></entry>
</row>
</tbody>
</tgroup>
@ -1051,9 +1056,7 @@ user is able to stream data.</simpara>
<simpara>In order to support the full spectrum of possible HTTP applications, Node&#8217;s
HTTP API is very low-level. It deals with connection handling and message
parsing only. It parses a message into headers and body but it does not
parse the actual headers or the body. That means, for example, that Node
does not, and will never, provide API to access or manipulate Cookies or
multi-part bodies. <emphasis>This is left to the user.</emphasis></simpara>
parse the actual headers or the body.</simpara>
<refsect3 id="_literal_http_server_literal">
<title><literal>http.Server</literal></title>
<informaltable
@ -1067,7 +1070,7 @@ rowsep="1" colsep="1"
<thead>
<row>
<entry align="left" valign="top">Event </entry>
<entry align="left" valign="top"> Parameters </entry>
<entry align="left" valign="top"> Parameters </entry>
<entry align="left" valign="top"> Notes</entry>
</row>
</thead>
@ -1075,24 +1078,27 @@ rowsep="1" colsep="1"
<row>
<entry align="left" valign="top"><simpara><literal>"request"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>request, response</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>request</literal> is an instance of <literal>http.ServerRequest</literal><?asciidoc-br?>
<literal>response</literal> is an instance of <literal>http.ServerResponse</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>request</literal> is an instance of <literal>http.ServerRequest</literal>
<?asciidoc-br?>
<literal>response</literal> is an instance of <literal>http.ServerResponse</literal></simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><literal>"connection"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>connection</literal></simpara></entry>
<entry align="left" valign="top"><simpara>When a new TCP connection is established.
<literal>connection</literal> is an object of type <literal>http.Connection</literal>. Usually users will not
want to access this event. The <literal>connection</literal> can also be accessed at
<literal>request.connection</literal>.</simpara></entry>
<literal>connection</literal> is an object of type
<literal>http.Connection</literal>. Usually users
will not want to access this event.
The <literal>connection</literal> can also be
accessed at <literal>request.connection</literal>.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><literal>"close"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>errorno</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Emitted when the server closes. <literal>errorno</literal>
is an integer which indicates what, if any,
error caused the server to close. If no
error occured <literal>errorno</literal> will be 0.</simpara></entry>
is an integer which indicates what, if any,
error caused the server to close. If no
error occured <literal>errorno</literal> will be 0.</simpara></entry>
</row>
</tbody>
</tgroup>
@ -1160,16 +1166,20 @@ rowsep="1" colsep="1"
<row>
<entry align="left" valign="top"><simpara><literal>"body"</literal></simpara></entry>
<entry align="left" valign="top"><simpara><literal>chunk</literal></simpara></entry>
<entry align="left" valign="top"><simpara>Emitted when a piece of the message body is received. Example: A chunk of
the body is given as the single argument. The transfer-encoding has been
decoded. The body chunk is a String. The body encoding is set
with <literal>request.setBodyEncoding()</literal>.</simpara></entry>
<entry align="left" valign="top"><simpara>Emitted when a piece of the
message body is received. Example: A chunk
of the body is given as the single
argument. The transfer-encoding has been
decoded. The body chunk is a String. The
body encoding is set with
<literal>request.setBodyEncoding()</literal>.</simpara></entry>
</row>
<row>
<entry align="left" valign="top"><simpara><literal>"complete"</literal></simpara></entry>
<entry align="left" valign="top"><simpara></simpara></entry>
<entry align="left" valign="top"><simpara>Emitted exactly once for each message. No arguments.
After emitted no other events will be emitted on the request.</simpara></entry>
<entry align="left" valign="top"><simpara>(none)</simpara></entry>
<entry align="left" valign="top"><simpara>Emitted exactly once for each message.
No arguments. After emitted no other
events will be emitted on the request.</simpara></entry>
</row>
</tbody>
</tgroup>
@ -1196,7 +1206,7 @@ Request URI Object. This contains only the parameters that are
present in the actual HTTP request. That is, if the request is
</simpara>
<screen>GET /status?name=ryan HTTP/1.1\r\n
Accept: */*\r\n
Accept: text/plain\r\n
\r\n</screen>
<simpara>Then <literal>request.uri</literal> will be</simpara>
<screen>{ path: "/status",
@ -1207,7 +1217,12 @@ Accept: */*\r\n
<simpara>In particular, note that <literal>request.uri.protocol</literal> is
<literal>undefined</literal>. This is because there was no URI protocol given
in the actual HTTP Request.</simpara>
<simpara><literal>request.uri.anchor</literal>, <literal>request.uri.query</literal>, <literal>request.uri.file</literal>, <literal>request.uri.directory</literal>, <literal>request.uri.path</literal>, <literal>request.uri.relative</literal>, <literal>request.uri.port</literal>, <literal>request.uri.host</literal>, <literal>request.uri.password</literal>, <literal>request.uri.user</literal>, <literal>request.uri.authority</literal>, <literal>request.uri.protocol</literal>, <literal>request.uri.params</literal>, <literal>request.uri.toString()</literal>, <literal>request.uri.source</literal></simpara>
<simpara>Here is what&#8217;s available: <literal>request.uri.anchor</literal>, <literal>request.uri.query</literal>,
<literal>request.uri.file</literal>, <literal>request.uri.directory</literal>, <literal>request.uri.path</literal>,
<literal>request.uri.relative</literal>, <literal>request.uri.port</literal>, <literal>request.uri.host</literal>,
<literal>request.uri.password</literal>, <literal>request.uri.user</literal>, <literal>request.uri.authority</literal>,
<literal>request.uri.protocol</literal>, <literal>request.uri.params</literal>, <literal>request.uri.toString()</literal>,
<literal>request.uri.source</literal></simpara>
</listitem>
</varlistentry>
<varlistentry>

14
doc/node.1

@ -1,11 +1,11 @@
.\" Title: node
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: 09/28/2009
.\" Date: 09/29/2009
.\" Manual:
.\" Source:
.\"
.TH "NODE" "1" "09/28/2009" "" ""
.TH "NODE" "1" "09/29/2009" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@ -170,7 +170,7 @@ exec("ls /")\.addCallback(function (stdout, stderr) {
.SS "Events"
Many objects in Node emit events: a TCP server emits an event each time there is a connection, a child process emits an event when it exits\. All objects which emit events are are instances of node\.EventEmitter\.
.sp
Events are represented by a snakecased string\. Here are some examples: "connection", "receive", "message_begin"\.
Events are represented by a camel\-cased string\. Here are some examples: "connection", "receive", "messageBegin"\.
.sp
Functions can be then be attached to objects, to be executed when an event is emitted\. These functions are called \fIlisteners\fR\.
.sp
@ -519,7 +519,7 @@ T}:T{
data
.sp
T}:T{
Each time the child process sends data to its stdout, this event is emitted\. data is a string\. If the child process closes its stdout stream (a common thing to do on exit), this event will be emitted with data === null\.
Each time the child process sends data to its stdout, this event is emitted\. data is a string\. + If the child process closes its stdout stream (a common thing to do on exit), this event will be emitted with data === null\.
.sp
T}
T{
@ -847,7 +847,7 @@ HTTP message headers are represented by an object like this
}
.fi
.RE
In order to support the full spectrum of possible HTTP applications, Node\(cqs HTTP API is very low\-level\. It deals with connection handling and message parsing only\. It parses a message into headers and body but it does not parse the actual headers or the body\. That means, for example, that Node does not, and will never, provide API to access or manipulate Cookies or multi\-part bodies\. \fIThis is left to the user\.\fR
In order to support the full spectrum of possible HTTP applications, Node\(cqs HTTP API is very low\-level\. It deals with connection handling and message parsing only\. It parses a message into headers and body but it does not parse the actual headers or the body\.
.sp
.sp
.it 1 an-trap
@ -967,6 +967,7 @@ T{
"complete"
.sp
T}:T{
(none)
.sp
T}:T{
Emitted exactly once for each message\. No arguments\. After emitted no other events will be emitted on the request\.
@ -988,7 +989,7 @@ Request URI Object\. This contains only the parameters that are present in the a
.RS 4
.nf
GET /status?name=ryan HTTP/1\.1\er\en
Accept: */*\er\en
Accept: text/plain\er\en
\er\en
.fi
.RE
@ -1010,6 +1011,7 @@ request\.uri\.protocol
is
undefined\. This is because there was no URI protocol given in the actual HTTP Request\.
.sp
Here is what\(cqs available:
request\.uri\.anchor,
request\.uri\.query,
request\.uri\.file,

Loading…
Cancel
Save