- Include Axios from a CDN (Content Delivery Network) - easiest way
- Download Axios manually and add the .js file to your page.
- Use NPM(Node Package Manager) to install and add it to your project’s dependancies. - recommended for large applications
If you don't want to download and host Axios yourself, you can include it from a CDN (Content Delivery Network). Just place below code before your closing </body> tag:
Install the latest version of Axios using NPM:
npm install axios --save
And the set it on the window object so we can start using it in our project:
window.axios = require('axios');