* 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.
This reverts commit ec29e3d264.
This patch prevents any agent being passed in which is not explicitly
an instance of `http.Agent`. This makes `node-fetch` no longer
compatible with https://npm.im/proxy-agent, which is one example of a
library that does not directly inherit from `http.Agent` directly.
Sorry for the revert -- I don't have an alternative patch because I
don't believe this is something node-fetch should be doing
automatically, because of how much of a limitation this could impose.
The original PR stated that this was to prevent requiring http/https,
and the effect would effectively be to force creation of an Agent on
every call. Note that this is already the behavior specified for
http.Agent when http.request received `false`. (See the bottom of the
[section on http.Agent in the Node
docs](https://nodejs.org/dist/latest-v7.x/docs/api/http.html#http_class_http_agent).
Cheers, and with apologies to @ahmadnassri for reverting their PR.