Skip to content

Commit 952ccd4

Browse files
committed
Merge pull request #91 from natanrolnik/master
Converts httpRequest body to string if needed
2 parents 72a956a + 0330245 commit 952ccd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ function addParseCloud() {
150150
options.uri = options.url;
151151
delete options.url;
152152
}
153+
if (typeof options.body === 'object') {
154+
options.body = JSON.stringify(options.body);
155+
}
153156
request(options, (error, response, body) => {
154157
if (error) {
155158
if (callbacks.error) {
@@ -178,4 +181,3 @@ function getClassName(parseClass) {
178181
module.exports = {
179182
ParseServer: ParseServer
180183
};
181-

0 commit comments

Comments
 (0)