Skip to content

Instantly share code, notes, and snippets.

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