mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
Fixing issue referencing wrong headers
This commit is contained in:
+3
-2
@@ -32,14 +32,15 @@ var axios = module.exports = function axios(options) {
|
|||||||
request.onreadystatechange = function () {
|
request.onreadystatechange = function () {
|
||||||
if (request && request.readyState === 4) {
|
if (request && request.readyState === 4) {
|
||||||
// Prepare the response
|
// Prepare the response
|
||||||
|
var headers = parseHeaders(request.getAllResponseHeaders());
|
||||||
var response = {
|
var response = {
|
||||||
data: transformData(
|
data: transformData(
|
||||||
request.responseText,
|
request.responseText,
|
||||||
options.headers,
|
headers,
|
||||||
options.transformResponse
|
options.transformResponse
|
||||||
),
|
),
|
||||||
status: request.status,
|
status: request.status,
|
||||||
headers: parseHeaders(request.getAllResponseHeaders()),
|
headers: headers,
|
||||||
config: options
|
config: options
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user