BREAKING CHANGE Nearly everything has changed. Rewrote most of this to use promises only, changed or renamed most options, etc.
- fix RequestError
- add "props" argument to RequestError
- refactor: include typescript def in release pkg
- fix: 304 not modified is no longer and error - wow
- BREAKING:
AuthorizationAgent#refresh()
is passed an Error object - BREAKING: rename exported class,
Error -> RequestError
- BREAKING: does not attempt to strip null/false values from JSON requests
- add
withCallback(Options, cb)
- switch to a slightly more permissive license (yes, better than MIT even)
- no more warnings about npm version
- add flow type definition
- add typescript definition
- avoid retries on 502/504 status codes
- add
.withStream()
- instead of providing only the response body, the
done
callback now provides headers too:(err, {statusCode, headers, body}) => ...
res = {headers, body, statusCode}
is now provided as the second argument even when there's an error, e.g. `honeybee({url}, (err, res) => ...)- rejected Promises now have
headers
andbody
attached to the Error object when possible