You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letcancellableRequest={name: 'axios-cancellable-request',req: function(payload){letjsonApi=payload.jsonApireturnjsonApi.axios(payload.req,{cancelToken: newjsonApi.axios.CancelToken(functionexecutor(c){// An executor function receives a cancel function as a parameterjsonApi.cancel=c;})})}}
But it doesn't work this way. And I can't see axios taking two params:
The part of the README on cancellable requests says:
But it doesn't work this way. And I can't see
axios
taking two params:index.js -> require('./lib/axios')
lib/axios/index.js -> var axios = createInstance(...)
lib/axios/index.js: createInstance -> var instance = bind(Axios.prototype.request, ...);
lib/axios/index.js -> module.exports = axios
Axios.prototype.request
So, the code is supposed to read:
The text was updated successfully, but these errors were encountered: