Existing libraries - like jquery, reqwest and superagent - had no easy support for promises, binary files and progress events, did not support a wide range of browser versions, did not nicely treat HTTP status codes. So I made this.
What happens if you use this with a different promise library (e.g. bluebird)? I'm rather confused - if everything implements it's own promises, does it "just work" or do we have to worry about it all getting rather messy?
Hi, thanks for the questions, sorry for the late reply..
httpinvoke fully implements Promises/A+ specification. The spec is very short and easily implementable. The implementation in httpinvoke takes only 568bytes when minified (check it out!).
So the answer is, if you use httpinvoke with a different promise library, it will work, unless the library really is at odds with Promises/A+ specification. Which is unlikely, because all the major promises libraries support it, even if they do not indicate that in their documentation.
httpinvoke only contact with the external promise (which it can only get when onFulfill or onReject returns one) is the .then method here .
Say, hypothetically (I haven't done any tests or anything) that Bluebird was faster than the included promise specification, is there some sort of dependency injection to replace it, seeing as it's a spec?