use json parsing in request

This commit is contained in:
Brian Gough 2020-06-12 15:15:51 +01:00
parent 5368630754
commit f99023320d

View file

@ -81,13 +81,14 @@ module.exports = Client = {
file,
line,
column
}
},
json: true
},
(error, response, body) => {
if (error != null) {
return callback(error)
}
return callback(null, JSON.parse(body))
return callback(null, body)
}
)
},
@ -103,13 +104,14 @@ module.exports = Client = {
page,
h,
v
}
},
json: true
},
(error, response, body) => {
if (error != null) {
return callback(error)
}
return callback(null, JSON.parse(body))
return callback(null, body)
}
)
},