Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ These are features in `fetch-h2`, that don't exist in the Fetch API. Some things
* `fetch()` has an extra option, `onTrailers` (of the type `OnTrailers`) which is a callback that will receive trailing headers.
* The `Request.clone()` member function has an optional `url` argument for the cloned `Request`.
* The response `text()` and `arrayBuffer()` has an optional argument `allowIncomplete` which defaults to `false`. If set to `true` these function will return incomplete bodies, i.e. "as much as was read" before the stream was prematurely closed (disconnected). If integrity checks are enabled, the functions will throw anyway if the body is incomplete.
* The `Request` class (options to `fetch`) has an extra property `allowForbiddenHeaders`, which defaults to `false`.
* The `Request` class (options to `fetch`) has an extra property `allowForbiddenHeaders`, which defaults to `false`. You can set this to `true` to bypass the "Header guard error: Cannot set forbidden header for requests (...)" error.
* The `Response` class also has an extra property `allowForbiddenHeaders`, which defaults to `false` (or to the value of the `Request` if it was constructed through a `fetch` call, which is the common case).
* The response object has an extra property `httpVersion` which is either `1` or `2` (numbers), depending on what was negotiated with the server.
* The `Headers` class (e.g. retried by `{response}.headers`) has a `toJSON` function which converts the headers to a simple JavaScript object.
Expand Down