//axios is like an easy fetch with a lot of more options
// the most simple example is this
import axios from 'axios' //ESmodules
try {
const response = await axios.get('/myEndpoint');
console.log(response);
} catch (error) {
console.error(error);
}
// axios has a method for every http method too
axios.get(url, config)
axios.delete(url, config)
axios.post(url, body, config)
axios.put(url, body, config)
axios.patch(url, body, config)