Converts httpRequest body to string if needed

This commit is contained in:
Natan Rolnik
2016-01-31 02:52:16 +02:00
parent 82e183cbc9
commit 03302459e2

View File

@@ -150,6 +150,9 @@ function addParseCloud() {
options.uri = options.url; options.uri = options.url;
delete options.url; delete options.url;
} }
if (typeof options.body === 'object') {
options.body = JSON.stringify(options.body);
}
request(options, (error, response, body) => { request(options, (error, response, body) => {
if (error) { if (error) {
if (callbacks.error) { if (callbacks.error) {
@@ -178,4 +181,3 @@ function getClassName(parseClass) {
module.exports = { module.exports = {
ParseServer: ParseServer ParseServer: ParseServer
}; };