{ return Parse.Cloud.httpRequest({ url: 'http://www.google.com/se" /> { return Parse.Cloud.httpRequest({ url: 'http://www.google.com/se" /> { return Parse.Cloud.httpRequest({ url: 'http://www.google.com/se"/>

Parse.Cloud.httpRequest is not a function

68 Views Asked by At

I created my cloud function as so:

Parse.Cloud.define("testHTTP", async (request) => {
  return Parse.Cloud.httpRequest({
    url: 'http://www.google.com/search',
    params: {
      q : 'Sean Plott'
    }
  }).then(function(httpResponse) {
    console.log(httpResponse.text);
    return httpResponse.text
  }, function(httpResponse) {
    console.error('Request failed with response code ' + httpResponse.status);
    return 'Request failed with response code ' + httpResponse.status
  });
});

And when I try to test it I get:

{
  "code": 141,
  "error": "Parse.Cloud.httpRequest is not a function"
}

What seems to be the problem?

0

There are 0 best solutions below