deadsimple/axioslibrary

A deadsimple module to use Axios components in your Magento2 projects

Installs: 1 480

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-module

1.0.2 2020-09-30 13:04 UTC

This package is auto-updated.

Last update: 2024-04-29 04:33:41 UTC


README

Latest Stable Version Total Downloads License

Deadsimple Axios Magento2 Composer Library

This package allows you to include the latest version of axios and use on a global level together with requirejs in your Magento2 setup straight out of the box

Installation

Use composer to install the module: composer require deadsimple/axioslibrary

Usage

Using this library is easy peasy, just include the axios script through requirejs, define Axios and use it wherever you like.

define([
  'Axios'
], function (axios) {
  'use strict';
  
  // Make a request for a user with a given ID
  axios.get('/user?ID=12345')
    .then(function (response) {
      // handle success
      console.log(response);
    })
    .catch(function (error) {
      // handle error
      console.log(error);
    })
    .then(function () {
      // always executed
    });
})

Version

This library loads: Axios v0.19.2