axios-jquery-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.0 • Public • Published

axios-jquery-adapter

Axios adapter for jquery.ajax

Quick start

Install via npm or yarn or pnpm

$ npm i --save axios-jquery-adapter
# or yarn
$ yarn add axios-jquery-adapter
# or pnpm
$ pnpm add axios-jquery-adapter

Example

  1. 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) // ==> /api/user/list
})

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i axios-jquery-adapter

Weekly Downloads

2

Version

0.1.0-alpha.0

License

none

Unpacked Size

243 kB

Total Files

20

Last publish

Collaborators

  • mitscherlich36