mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
Move transform response logic from adapters to dispatcher
This commit is contained in:
@@ -56,6 +56,15 @@ module.exports = function dispatchRequest(config) {
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
}).then(function onFulfilled(response) {
|
||||
// Transform response data
|
||||
response.data = transformData(
|
||||
response.data,
|
||||
response.headers,
|
||||
config.transformResponse
|
||||
);
|
||||
|
||||
return response;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user