2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Adding tests for responseType arraybuffer

This commit is contained in:
mzabriskie
2015-02-02 21:12:08 -07:00
parent d27cef35ba
commit 59093a9c61
2 changed files with 39 additions and 1 deletions
+2 -1
View File
@@ -34,9 +34,10 @@ module.exports = function xhrAdapter(resolve, reject, config) {
if (request && request.readyState === 4) {
// Prepare the response
var headers = parseHeaders(request.getAllResponseHeaders());
var responseData = ['text', ''].indexOf(config.responseType || '') !== -1 ? request.responseText : request.response;
var response = {
data: transformData(
['text', ''].indexOf(config.responseType || '') !== -1 ? request.responseText : request.response,
responseData,
headers,
config.transformResponse
),