0

Is it an obligation to learn ajax to make http requests to the server?

I always ask myself if there is a simpler method to make http requests without using ajax. Please answer me if you know how to do this.

7th Apr 2019, 8:35 AM
QX 99
QX 99 - avatar
1 Réponse
+ 2
ajax provided by jquery is rather very short and easy syntax to make http requests. If you rather want to work with the raw XMLHttpRequest boilerplate code, you won't feel at home. If you don't want to reach out for jquery ajax, you could use fetch, natively built into browsers for asynchronous http requests. Just a quick hint, the fetch api uses promises, if you aren't familiar with promises, it's going to throw you off. Or you could use another third party library called axios. And that also uses promise. Hope it helps, happy coding....
7th Apr 2019, 8:17 PM
Benneth Yankey
Benneth Yankey - avatar