-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Parse.Cloud.httpRequest fails if body is not a string #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please open the PR. Yeah, it looks like the 'request' module we use only supports a string body. |
But it works fine when running it in the Parse hosted Cloud Code |
Because Parse hosted cloud code doesn't use node or the 'request' module... It's a v8 engine with some node-like properties, but mostly custom built. |
I see... Ok, will add it soon. Thanks! |
Small JS question: if |
Should be, yeah. |
More CS Fixes
Update app.json
Hey Fosco!
In one of my objects, I had a
afterSave
hook where I do a http post to another Parse app.However, the
body
parameter passed is an object, not a string, and this causes the app to throw an exception:I looked into it, and locally was able to solve it in a easy way. When defining
Parse.Cloud.httpRequest
inindex.js
, line 145 I added:It simply converts the object to a string if it's necessary. Is this a correct fix? If so, I can open a PR.
The text was updated successfully, but these errors were encountered: