From 03302459e243462858104b3d5a7e19713dc9c723 Mon Sep 17 00:00:00 2001 From: Natan Rolnik Date: Sun, 31 Jan 2016 02:52:16 +0200 Subject: [PATCH] Converts httpRequest body to string if needed --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 79a321986f..e2115f4098 100644 --- a/index.js +++ b/index.js @@ -150,6 +150,9 @@ function addParseCloud() { options.uri = options.url; delete options.url; } + if (typeof options.body === 'object') { + options.body = JSON.stringify(options.body); + } request(options, (error, response, body) => { if (error) { if (callbacks.error) { @@ -178,4 +181,3 @@ function getClassName(parseClass) { module.exports = { ParseServer: ParseServer }; -