Skip to content

Instantly share code, notes, and snippets.

@sergiodxa
Last active August 29, 2015 14:21
Show Gist options
  • Save sergiodxa/a858835e4ed55d4cac6a to your computer and use it in GitHub Desktop.
Save sergiodxa/a858835e4ed55d4cac6a to your computer and use it in GitHub Desktop.
Callbacks
import xhr from 'xhr';
xhr({
url: '/api/resource'
}, response => {
console.log(response);
}, error => {
console.log(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment