So I am trying to get the cloud code to do an aftersave event that pings another location to do some data saving.
It has some data that needs to be sent as well.
Parse.Cloud.afterSave("ArtPiece", function(request) {
var artistURL = 'http://www.gallery-admin-dev.iartview.com/Gilmans/imageSave.php';
var pieceName = "Robert Rauschenberg Quote";
var url = 'http://www.gilmancontemporary.com/wp-content/uploads/2015/06/Delicate_Garden.The_Bear.48x42.jpeg';
Parse.Cloud.httpRequest({
url: artistURL,
dataType : "text",
crossDomain: true,
type:"GET",
data : {
pieceName : pieceName,
url : url
},
success: function(httpResponse) {
response(httpResponse.text);
},
error: function(httpResponse) {
response('Request failed with response code ' + httpResponse.status)
}
});
});
The code does not give an error, or any warnings. Me saving/creating entries works fine.
Cors is already handled, as I can successfully make this call with an ajax script.
Any clue why this is not sending? Can I not have data in a parse httpRequest? Can it not be crossdomain?
Alternatively Is there a way to test this code outside of the Parse Cloud???