Get started with axios CDN

MIT licensed

Axios is a popular library for making asynchronous HTTP requests.

Tags:
  • xhr
  • http
  • ajax
  • promise
  • node

Stable version

Copied!

How to start using axios CDN


// Include Axios from the CDN
const axios = require('axios'); // For browsers, use 'import' instead of 'require'

axios.get('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.log(error);
  });
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions