use json parsing in request
This commit is contained in:
@@ -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)
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user