How to install Axios


Axios is a client HTTP API based on the XMLHttpRequest interface provided by browsers.

Axios depends on a native ES6 Promise implementation to be supported. If your environment doesn't support ES6 Promises, you can polyfill.


You can download the latest version of Axios from the GitHub releases or use a Axios CDN.

You can install Axios using:

Cloning a repository

You can clone a repository from to your local computer.
Cloning with HTTPS URLs
git clone
Cloning with SSH URLs
git clone [email protected]:axios/axios.git
Cloning with GitHub CLI
gh repo clone axios/axios

Install via NPM package

Run the following command to locally install the package and its dependencies with NPM.
Next Version:0.20.0-0
Publish Time:2020-07-16 00:07:30
Unpacked Size:357.57 kB
Downloading and installing packages locally
npm i axios
npm install axios
yarn add axios
Downloading and installing packages globally
npm i -g axios
yarn global add axios
Install Specific Version of a Package
npm install [email protected]
bower install axios


GET: - Performing a GET request.

const axios = require('axios');

// Make a request for a user with a given ID
  .then(function (response) {
    // handle success
  .catch(function (error) {
    // handle error
  .then(function () {
    // always executed

POST: - Performing a POST request.'/user', {
    firstName: 'Fred',
    lastName: 'Flintstone'
  .then(function (response) {
  .catch(function (error) {