diff options
author | Austin Wright <aaa@bzfx.net> | 2019-06-27 16:10:55 -0700 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2019-07-20 11:13:05 +0200 |
commit | 2308c7412a12d3d7a61a8b66ba236f8a17a1c699 (patch) | |
tree | 3a6a6d1696b5836bc1f9340cb4d651bf1691f10a /doc | |
parent | 9b2eee12eb56c0439165282619d92c192a6663e7 (diff) | |
download | android-node-v8-2308c7412a12d3d7a61a8b66ba236f8a17a1c699.tar.gz android-node-v8-2308c7412a12d3d7a61a8b66ba236f8a17a1c699.tar.bz2 android-node-v8-2308c7412a12d3d7a61a8b66ba236f8a17a1c699.zip |
http: expose headers on an http.ClientRequest "information" event
1xx intermediate status responses are allowed to have headers; so
expose the "httpVersion", "httpVersionMajor", "httpVersionMinor",
"headers", "rawHeaders", and "statusMessage" properties on this
event.
PR-URL: https://github.com/nodejs/node/pull/28459
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/http.md | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/api/http.md b/doc/api/http.md index 999cb4da4c..17e60e2fa5 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -421,10 +421,18 @@ added: v10.0.0 --> * `info` {Object} + * `httpVersion` {string} + * `httpVersionMajor` {integer} + * `httpVersionMinor` {integer} * `statusCode` {integer} - -Emitted when the server sends a 1xx response (excluding 101 Upgrade). The -listeners of this event will receive an object containing the status code. + * `statusMessage` {string} + * `headers` {Object} + * `rawHeaders` {string[]} + +Emitted when the server sends a 1xx intermediate response (excluding 101 +Upgrade). The listeners of this event will receive an object containing the +HTTP version, status code, status message, key-value headers object, +and array with the raw header names followed by their respective values. ```js const http = require('http'); |