Other Libraries and XMLHttpRequest
This section explores other approaches to AJAX with JavaScript. The approach to making REST calls using jQuery and callbacks is just one of many different options available and was presented first as it's the most straightforward and easy-to-understand option for novice users. This is not to say the approach is not powerful though. And it is really all that is needed in many cases. Remember that jQuery offers other functionality you may want to use in your application as well.
Axios and the Fetch API
At this point in the book, we'd like to mention two other popular choices that may be appropriate to be used in your projects, Axios and the Fetch API. These use advanced concepts such as promises, so they will not be covered here but will be covered in Chapter 15, Asynchronous Tasks of the advanced module. (Note that even jQuery itself offers variations on the AJAX methods that return promises instead of using callbacks, but this usage...