diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 2ad7e3e..0d3abb8 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -36,7 +36,7 @@ module.exports = function xhrAdapter(resolve, reject, config) { var headers = parseHeaders(request.getAllResponseHeaders()); var response = { data: transformData( - request.responseText, + ['text', ''].indexOf(config.responseType || '') !== -1 ? request.responseText : request.response, headers, config.transformResponse ), @@ -97,4 +97,4 @@ module.exports = function xhrAdapter(resolve, reject, config) { // Send the request request.send(data); -}; \ No newline at end of file +};