Axios is a Promise-based HTTP client for JavaScript which can be used in your front-end application and in your Node.js backend.
Promise based HTTP client for the browser and Node.js, available on Github.
Features
- Make
XMLHttpRequest
from the browser - Make HTTP requests from Node.js
- Supports the
Promise
API - Intercept request and response
- Transform request and response data
- Automatic transforms for JSON data
- Client side support for protecting against XSRF
Installation
Using npm:
npm install axios
Using bower:
bower install axios
Using yarn:
yarn add axios
Using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
Using unpkg CDN:
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>