Update utils.js

This commit is contained in:
Aleksandr Statciuk 2022-03-06 13:49:28 +03:00
parent be8bb3804a
commit 570696964b
1 changed files with 14 additions and 0 deletions

View File

@ -266,6 +266,20 @@ utils.getUTCDate = function (d = null) {
}
utils.parseResponse = async (item, response, config) => {
if (config.debug) {
console.log(
'Response:',
JSON.stringify(
{
headers: response.headers,
data: response.data.toString()
},
null,
2
)
)
}
const data = merge(item, config, {
content: response.data.toString(),
buffer: response.data,