A jsonp adapter for axios
support promise,support cancel,same as xhr
let axios = require('axios');
let jsonpAdapter = require('axios-jsonp');
axios({
url: '/jsonp',
adapter: jsonpAdapter,
callbackParamName: 'callback', // optional, 'callback' by default
}).then((res) => {
});
源码比较简单,这里的设计考虑的也是比较周全的,直接看源码即可 ./lib/index.js