superagent
Advanced tools
Changelog
2.0.0 (2016-05-29)
Breaking changes are in rarely used functionality, so we hope upgrade will be smooth for most users.
.parse()
method has been renamed to .serialize()
for consistency with NodeJS version.'undefined'
, now their value is ''
(empty string) (shura, Kornel Lesiński).redirect
event is called after new query string and headers have been set and is allowed to override the request URL (Kornel Lesiński).then()
returns a real Promise
. Note that use of superagent with promises now requires a global Promise
object.
If you target Internet Explorer or Node 0.10, you'll need require('es6-promise').polyfill()
or similar.@api private
to have _prefixed
names (Kornel Lesiński)FormData
error events (scriptype)request.head()
supports .redirects(5)
call (Kornel Lesiński)response
event is also emitted when using .pipe()
Changelog
1.8.2 (2016-03-20)
vnd+json
MIME types (Kornel Lesiński).parse()
as .serialize()
for forward compatibilityChangelog
1.8.0 (2016-03-09)
{type:'auto'}
to auth
method, which enables browser-native auth types (Jungle, Askar Yusupov)responseType()
to set XHR responseType
(chris)FormData
(Peter Lyons)statusCode
to error response when JSON response is malformed (mattdell)