* fix import rule for stream PassThrough
* avoid named export for compatibility below node 10
* compress flag should not overwrite accept encoding header
* doc update
* 2.2.1
* v2.x readme overhaul with additions discussed in #448
added "comments" (TODO link references) for changes suggested but not yet implemented for future discussion/prs
clarified "native stream" to be "native Node streams"
adjusted all uses of http to https to encourage secure protocol usage
adjusted whatwg to proper case, WHATWG
made code block tags consistent as `js` instead of `javascript`
uppercased all method option values (post vs POST)
added spec-compliant node to the `response.ok` api section
* fix left over cruft, inconsistent hierarchy
This reverts commit fa6548ed31 (#441).
The autoClose option has been true by default since at least Node.js
v6.0.0. There is no need to set it once more.
Instead, make the example more realistic by handling stream outcomes
using a promise.
See #375.
Unfortunately, I could not write a test case that allows testing the bug
in #428. Credits to Roman Zaharenkov <ZaharenkovRoman@gmail.com> for
discovering this long-standing bug and proposing a first version of the
fix.
Co-authored-by: Roman Zaharenkov <ZaharenkovRoman@gmail.com>
Fixes: #428
- Handle Location-less redirect like non-redirect response.
- Include bodies when redirecting to non-POST 301/302 and all 307/308
response.
Co-authored-by: Gregor Martynus <gregor@martynus.net>
This is unfortunately impossible to test, since the Node.js HTTP library
lower-cases all incoming headers. However, this matters for outgoing
HTTP requests. See the linked issues from the linked Fetch Standard pull
request.
See: https://github.com/whatwg/fetch/pull/476
- Make read-only attributes actually read-only
- Set @@toStringTag on the prototype only
- Make prototype methods/getters enumerable
Based on #354.
Co-authored-by: Benjamin Seber <seber@synyx.de>