I'm trying to make an https PATCH request from Parse Cloud code (to update part of an object in a Firebase application), and I'm running into the following issues:
Anyone having tried something similar with Parse?
For now my fallback is to do a PUT request instead an update the whole object, but if anyone has some experience with these issues that'd be great
EDIT: Someone from Parse just replied here saying that they don't support PATCH requests as of now but will do in the future
you don't need patch method.
if you want update a node you should use put method.
example;
i want to change
https://testapp.firebaseio.com/firstnode/node/user value
my request;
var x = { "user": "0101010101"};
Parse.Cloud.httpRequest({
method: 'PUT',
url: 'https://testapp.firebaseio.com/firstnode/node/.json',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: x
}).then(function(httpResponse) {
console.log(httpResponse.text);
}, function(httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
});