-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'cancelToken' of undefined #83
Comments
@itsazzad |
+1,I met too, @liyuanqiu, Have you solved it? |
Look the Comments axios.interceptors.request.use(function(config) {
console.log('request => config ====================================');
console.log(config);
console.log('request => config ====================================');
// if u add new Chainable promise or other interceptor
// You have to return `config` inside of a rquest
// otherwise u will get a very confusing error
// and spend sometime to debug it.
return config;
}, function(error) {
return Promise.reject(error);
}); |
@vuchan |
If you write |
@vuchan you are right after return it's working perfectly. Below is my working code, axiosInstance.interceptors.request.use((request) => {
|
Config should be returned at the end |
thanks, a lot. |
this saved my day. thanks :) |
hi |
thanks,that's right ! bro |
The text was updated successfully, but these errors were encountered: