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 'doc/api/http.md')
-rw-r--r--doc/api/http.md27
1 files changed, 12 insertions, 15 deletions
diff --git a/doc/api/http.md b/doc/api/http.md
index 61ef6edfd23..713edd02180 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -71,7 +71,7 @@ the requests to that server, but each one will occur over a new connection.
When a connection is closed by the client or the server, it is removed
from the pool. Any unused sockets in the pool will be unrefed so as not
to keep the Node.js process running when there are no outstanding requests.
-(see [socket.unref()]).
+(see [`socket.unref()`]).
It is good practice, to [`destroy()`][] an `Agent` instance when it is no
longer in use, because unused sockets consume OS resources.
@@ -167,7 +167,7 @@ added: v8.1.0
* `socket` {net.Socket}
Called when `socket` is detached from a request and could be persisted by the
-Agent. Default behavior is to:
+`Agent`. Default behavior is to:
```js
socket.setKeepAlive(true, this.keepAliveMsecs);
@@ -257,7 +257,7 @@ added: v0.3.6
* {number}
-By default set to Infinity. Determines how many concurrent sockets the agent
+By default set to `Infinity`. Determines how many concurrent sockets the agent
can have open per origin. Origin is the returned value of [`agent.getName()`][].
### agent.requests
@@ -790,7 +790,7 @@ changes:
for `'clientError'`.
- version: v9.4.0
pr-url: https://github.com/nodejs/node/pull/17672
- description: The rawPacket is the current buffer that just parsed. Adding
+ description: The `rawPacket` is the current buffer that just parsed. Adding
this buffer to the error object of `'clientError'` event is to
make it possible that developers can log the broken packet.
-->
@@ -924,10 +924,7 @@ This method is identical to [`server.listen()`][] from [`net.Server`][].
added: v5.7.0
-->
-* {boolean}
-
-A Boolean indicating whether or not the server is listening for
-connections.
+* {boolean} Indicates whether or not the server is listening for connections.
### server.maxHeadersCount
<!-- YAML
@@ -1761,11 +1758,11 @@ changes:
description: The `options` argument is supported now.
-->
- `options` {Object}
- * `IncomingMessage` {http.IncomingMessage} Specifies the IncomingMessage class
- to be used. Useful for extending the original `IncomingMessage`.
+ * `IncomingMessage` {http.IncomingMessage} Specifies the `IncomingMessage`
+ class to be used. Useful for extending the original `IncomingMessage`.
**Default:** `IncomingMessage`.
- * `ServerResponse` {http.ServerResponse} Specifies the ServerResponse class to
- be used. Useful for extending the original `ServerResponse`. **Default:**
+ * `ServerResponse` {http.ServerResponse} Specifies the `ServerResponse` class
+ to be used. Useful for extending the original `ServerResponse`. **Default:**
`ServerResponse`.
- `requestListener` {Function}
@@ -1868,8 +1865,8 @@ changes:
v6 will be used.
* `port` {number} Port of remote server. **Default:** `80`.
* `localAddress` {string} Local interface to bind for network connections.
- * `socketPath` {string} Unix Domain Socket (use one of host:port or
- socketPath).
+ * `socketPath` {string} Unix Domain Socket (use one of `host:port` or
+ `socketPath`).
* `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
* `path` {string} Request path. Should include query string if any.
@@ -2073,7 +2070,7 @@ not abort the request or do anything besides add a `'timeout'` event.
[`socket.setKeepAlive()`]: net.html#net_socket_setkeepalive_enable_initialdelay
[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_nodelay
[`socket.setTimeout()`]: net.html#net_socket_settimeout_timeout_callback
+[`socket.unref()`]: net.html#net_socket_unref
[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
[Readable Stream]: stream.html#stream_class_stream_readable
[Writable Stream]: stream.html#stream_class_stream_writable
-[socket.unref()]: net.html#net_socket_unref