Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2014 13:44
Show Gist options
  • Save anonymous/10877762 to your computer and use it in GitHub Desktop.
Save anonymous/10877762 to your computer and use it in GitHub Desktop.
// somewhere in your data source:
someMethod: function () {
SC.Request.getUrl('http://your.url.here').json().notify(this, this._myCallbackMethod).send();
},
_myCallbackMethod: function (result) {
if (SC.ok(result)){
// successfully retrieved
}
else {
//error
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment