Added logic to add http response status in

This commit is contained in:
patelravi 2019-04-11 14:43:35 +05:30
parent ccb8200d7c
commit 764c78ac1f

View file

@ -59,6 +59,10 @@ export function Request(config) {
}
} else {
let body = response.body;
let isObj = typeof _body === 'object' && _body !== null && !(_body instanceof Array) && !(_body instanceof Date)
if (isObj) {
_body['statusCode'] = response.statusCode;
}
resolve({ response: response, body: body });
}
});