Closed boldtrn closed 7 years ago
Since we only use it for simple AJAX requests we could also write plain JS as described here.
Is this portable across different browser?
Is this portable across different browser?
Not too sure. CanIUse seems to be rather unoptimistic.
http://caniuse.com/#search=XMLHttpRequest
On the other hand it seems for example superagend uses the same. But probably using a lib for now would be safer, as implementing all the details might be a bit of a overhead.
Yes, I also would favour the library here
Ok, it seems like request is not what we are looking for: https://github.com/request/request/issues/2090. It seems that the lib grows ~1.8mb. Superagent does not support IE<9. Not sure if that is an issue though.
So there are some alternatives, but I think superagent might be a good fit. Will try this and see how it works out.
I think we should get rid of the JQuery dependency. We could use https://github.com/visionmedia/superagent but probably worth a different issue. (A more popular is https://github.com/request/request but it has also a lot dependencies)
Since we only use it for simple AJAX requests we could also write plain JS as described here.