// axios const options = { url: 'http://localhost/test.htm', method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json;charset=UTF-8' }, data: { a: 10, b: 20 } }; axios(options) .then(response => { console.log(response.status); }); // fetch() const url = 'http://localhost/test.htm'; const options = { method: 'POST', headers: { 'Accept': 'application/json', 'Content
![Axiosとfetchの比較](https://cdn-ak-scissors.b.st-hatena.com/image/square/7c28b3d0c1233c28380e81568183f4b1e274b173/height=288;version=1;width=512/https%3A%2F%2Fstorage.googleapis.com%2Fzenn-user-upload%2Favatar%2F377a196371.jpeg)