Skip to content

Instantly share code, notes, and snippets.

@cognitom
Created July 25, 2014 02:26
Show Gist options
  • Save cognitom/960b846a9cd435254e26 to your computer and use it in GitHub Desktop.
Save cognitom/960b846a9cd435254e26 to your computer and use it in GitHub Desktop.
Call a cloud function on Parse.com from AngularJS
.controller 'SampleController', ($scope, $http) ->
$scope.data = []
$http
method: 'post'
url: 'https://api.parse.com/1/functions/sample_function'
headers:
'X-Parse-Application-Id': APP_ID
'X-Parse-REST-API-Key': API_KEY
'Content-Type': 'application/json'
data: {}
.success (data, status) ->
$scope.data = data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment