Skip to content

Instantly share code, notes, and snippets.

@msomu
Created January 28, 2016 14:39
Show Gist options
  • Select an option

  • Save msomu/4d35b2d3bd73a73eac53 to your computer and use it in GitHub Desktop.

Select an option

Save msomu/4d35b2d3bd73a73eac53 to your computer and use it in GitHub Desktop.
Angular HttpService
// Simple GET request example:
$http({
method: 'GET',
url: '/someUrl'
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment