Advertisement
DanecSVK

Untitled

Jan 6th, 2021
1,932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // then
  2. this.axios.get("https://blockchain.info/ticker")
  3. .then(result => {
  4.     console.log(result);
  5. }).catch(err => {
  6.     console.error(err);
  7. });
  8.  
  9. // await
  10. try {
  11.     let result = await this.axios.get("https://blockchain.info/ticker");
  12.     console.log(result);
  13. } catch(err) {
  14.     console.error(err);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement