-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
config.data has been changed in response interceptor #1386
Copy link
Copy link
Closed
Description
I am using axios request and response interceptors but it seems response.config.data is not an Object.
Here is my Request interceptor:
config.data is an instance of my Form Object
API.interceptors.request.use((config) => {
if (config.data instanceof Form) {
config.data.startProcessing()
}
return config
})Now going to the response interceptor, it seems it is not a Form anymore when it is a string already.
API.interceptors.response.use((response) => {
// this response.config.data is now a string not my Form object anymore
if (response.config.data instanceof Form) {
response.config.data.finishProcessing()
}
return response
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels