Syntax
- fetch(url, options)[.then(...)[.catch(...)]]
- The Fetch API is the most commonly used API for HTTP requests. It is modern, flexible and it uses promises.
- The XMLHttpRequest API is also used for HTTP requests and is mainly included so that developers may use their favorite existing libraries, like ApiSauce.
- The Websocket API may be used for "live" data in real time scenarios, such as in chat applications.