Skip to content

Migrating 0.x to 1.x

Roman Shtylman edited this page Mar 9, 2015 · 4 revisions

Migrating from v0.x to v1.x

  • callback for .end() will always be passed err, res. Arity is no longer used to detect response only.

Before

superagent
.get('/foo')
.end(function(res) {
});

After

superagent
.get('/foo')
.end(function(err, res) {
});
Clone this wiki locally