diff --git a/doc/api/http.md b/doc/api/http.md index 21d8f412af303f..93a43105c51075 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -3820,7 +3820,16 @@ changes: * `family` {number} IP address family to use when resolving `host` or `hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be used. - * `headers` {Object} An object containing request headers. + * `headers` {Object | Array} Request headers to send with the request. This can be: + * An object like `{ 'Content-Type': 'application/json' }`. + * A flat array of header name/value pairs like `[ 'Content-Type', 'text/plain', 'X-Custom', + 'yes' ]`. This format is the same as used in [`response.writeHead()`][] and exposed in + `request.rawHeaders`. + When passing `headers` as an array, it must be a flat list of alternating + header names and values. Nested arrays or objects are not supported in this + form. This array format is identical to that used in [`response.writeHead()`][] + and `request.rawHeaders`, and is often useful when working with raw header + data directly. * `hints` {number} Optional [`dns.lookup()` hints][]. * `host` {string} A domain name or IP address of the server to issue the request to. **Default:** `'localhost'`.