Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,18 @@ console.log(request.headers);

See [Headers Object][].

*Note*: In HTTP/2, the request path, host name, protocol, and method are
represented as special headers prefixed with the `:` character (e.g. `':path'`).
These special headers will be included in the `request.headers` object. Care
must be taken not to inadvertently modify these special headers or errors may
occur. For instance, removing all headers from the request will cause errors
to occur:

```js
removeAllHeaders(request.headers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should the arg be request, not request.headers?

assert(request.url); // Fails because the :path header has been removed
```

#### request.httpVersion
<!-- YAML
added: v8.4.0
Expand Down