Merge pull request #91 from natanrolnik/master
Converts httpRequest body to string if needed
This commit is contained in:
4
index.js
4
index.js
@@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user