You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original on("reponse", fn) is called when actually made a HTTP request, while this one is called immediately (before make a HTTP request), that is different behavior than original implementation.
The text was updated successfully, but these errors were encountered:
I created the above fork/pull request. Until it gets merged, you can install it with npm install "superagent-defaults@https://github.com/larvanitis/superagent-defaults/archive/0.2.0.tar.gz"
From the source
index.js
Just wonder, why not pass
on()
method to supeagent's request? instead of create your own emitter.UPDATE
Although
use()
can make it works, that needs extra typings, and different from original way.Besides the implementation at https://github.com/camshaft/superagent-defaults/blob/master/lib/context.js#L71 may cause bug.
Original
on("reponse", fn)
is called when actually made a HTTP request, while this one is called immediately (before make a HTTP request), that is different behavior than original implementation.The text was updated successfully, but these errors were encountered: