It should officially support node and the browser through component(1)
. I don't personally want to worry about browserify, but if the desire is strong enough we can do that too.
The main goal here is to leverage component to share more internal code between node and the browser.
It should have plugin support via the traditional .use(fn)
method. It will be up to the plugin authors to ensure it works in all environments or document it's entended usage.
var request = require('superagent');
var retry = require('superagent-retry');
request
.get('/')
.use(retry(2))
.end(callback);
See: ladjs/superagent#294
By supporting plugins, it should remove features that were bundled previously and write plugins for them. Including:
- authentication
- multipart
- ????
I think a good candidate for a plugin is a feature that does not work both in node and the browser and also a feature that has it's own level of complexity/options (e.g authentication).
It should support streams2 and also keep in mind the browser stream stuff for future's sake.
See: https://github.com/whatwg/streams
It should be a little more straight forward, following @defunctzombie's ideas.
See: ladjs/superagent#283
Need to look into all the issues and feature requests for this more...
Nope.