2
0
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:
Matt Zabriskie
2016-06-23 15:11:35 -06:00
parent e833a2f7e4
commit 10eb238651
4 changed files with 20 additions and 16 deletions
+9
View File
@@ -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;
});
};