npm i --save ajax-util
import ajaxUtil from 'ajax-util';
ajaxUtil.get({
url: 'package.json',
success: (result) => {
console.log(result);
}
});
url @String
params @Object
success @Function
error @Function
before @Function
after @Function
headers @Object
sync @Boolean
timeout @Number
responseType @String