at the time writing this, the latest version was
1.4.0
.
The provided type for request intercetptor functions changed:
- AxiosRequestConfig
+ InternalAxiosRequestConfig
This also changes the type of config.headers
to AxiosRequestHeaders
(which is an axios internal Headers object).
axiosInstance.interceptors.request.use(function (config) {
- config.headers['Authorization'] = 'Bearer xxx';
+ config.headers.set('Authorization', 'Bearer xxx')
return config
})
When using postman to intercept axios requests, the proxy HAS to be defined as http