mirror of
https://github.com/donl/plivo-node.git
synced 2026-06-30 06:12:08 -06:00
Added logic to add http response status in
This commit is contained in:
parent
ccb8200d7c
commit
764c78ac1f
1 changed files with 4 additions and 0 deletions
|
|
@ -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 });
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue