I currently have an application using Parse as a BaaS. I created a web crawler in Python because it's fairly simple and I'm hosting the code for that crawler on Heroku. My problem is I'm trying to call that Python script from an httpRequest in Parse Cloud Code using a POST request because a GET request is limited on the size of the data you can get back. Also, using a GET request works for fetching the page and running the code, I just don't get the data back. When I use a POST request I run into a problem with the Heroku server that says
Forbidden (403)
CSRF verification failed. Request aborted.
You are seeing this message because this HTTPS site requires a 'Referer header'
to be sent by your Web browser, but none was sent.
Here is my Cloud Code httpRequest on Parse (I'm not very familiar with requests so something is probably flawed on my side)
Parse.Cloud.httpRequest({
method: 'POST',
url: 'https://vast-basin-5892.herokuapp.com/',
body: {
beer: request.params.beer
},
params: {
beer : request.params.beer
},
success: function(httpResponse){
response.success(httpResponse.text);
}, error: function(httpResponse){
response.error(httpResponse);
}
});
I have been struggling with this for several days and would appreciate any help.
You wrote : "GET request is limited on the size of the data you can get back" - it is't true. GET request has limit on size of data you can send.
Have you tried to send GET request?