axios-jquery-adapter
Axios adapter for jquery.ajax
Quick start
Install via npm or yarn or pnpm
$ npm i --save axios-jquery-adapter
$ yarn add axios-jquery-adapter
$ pnpm add axios-jquery-adapter
Example
- make an
application/json
request:
import $ from 'jquery'
import axios from 'axios'
import jqueryAdapter from 'axios-jquery-adapter'
export const axiosJson = axios.create({
adapter: jqueryAdapter,
})
axiosJson.get('/api/user/list')
$(document).ajaxComplete(function onComplete(event, jqXHR, settings) {
console.log(settings.url)
})
License
MIT