use json parsing in request

This commit is contained in:
Brian Gough
2020-06-12 15:15:51 +01:00
parent 33d6462875
commit 6569da0242

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)
}
)
},