Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 28, 2024 via pnpm

axios 1.6.7

Promise based HTTP client for the browser and node.js
Package summary
Share
0
issues
1
license
9
MIT
Package created
29 Aug 2014
Version published
25 Jan 2024
Maintainers
4
Total deps
9
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
asynckit@0.4.0
axios@1.6.7
combined-stream@1.0.8
delayed-stream@1.0.0
follow-redirects@1.15.6
form-data@4.0.0
mime-db@1.52.0
mime-types@2.1.35
proxy-from-env@1.1.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of axios 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
follow-redirects1.15.628.68 kBMIT
prod
form-data4.0.010.24 kBMIT
prod
proxy-from-env1.1.07.59 kBMIT
prod

Visualizations

Frequently Asked Questions

What does axios do?

Axios is a highly popular, promise-based HTTP client designed for use in both web browsers and Node.js applications. Offering a wide range of features, Axios is utilized for making XMLHttpRequests in the browser and for making HTTP requests in node.js. Employing the Promise API, developers can easily manage asynchronous HTTP request-and-response communications. Some key features include the ability to intercept request and response data, transform request and response data, cancel requests, and automatically handle transforming of JSON data. Axios supports a wide range of client-side protection capabilities against Cross-Site Request Forgery (XSRF) and offers seamless compatibility with a range of popular modern and legacy browsers.

How do you use axios?

Using Axios is simple and intuitive. To start, you need to install it using npm or yarn:

$ npm install axios

or

$ yarn add axios

Once you've installed Axios, you can start making HTTP requests. Here's an example on how to perform a GET request using Axios:

const axios = require('axios');

axios.get('https://api.example.com/data')
  .then(function (response) {
    // handle success
    console.log(response.data);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .finally(function () {
    // always executed
  });

For a POST request, you can do the following:

const axios = require('axios');

axios.post('https://api.example.com/data', {
    item: 'Item Data',
    info: 'Some Information'
  })
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.log(error);
  });

Multiple concurrent requests can be made using Promise.all:

const axios = require('axios');

function getFirstData() {
  return axios.get('https://api.example.com/data1');
}

function getSecondData() {
  return axios.get('https://api.example.com/data2');
}

Promise.all([getFirstData(), getSecondData()])
  .then(function (results) {
    console.log(results[0].data);
    console.log(results[1].data);
  });

Where are the axios docs?

The official documentation for Axios, complete with detailed explanations & usage examples for all of its available features and functionalities, can be found at axios-http.com/docs/intro. This comprehensive guide offers insights into all aspects of making HTTP requests with Axios and managing the responses effectively.