Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import { create } from 'apisauce';
  2.  
  3. //config is case sensitive durning the pair programming session I wrote 'baseUrl' instead of 'baseURL'
  4. const api = create({
  5. baseURL: 'http://blockchain.info',
  6. });
  7.  
  8.  
  9. (async () => {
  10. const response = await api.get("/ticker");
  11. console.log("response: " + response.status);
  12. console.log("status: " + response.ok);
  13. if (response.data.PLN.symbol === "zł") {
  14. console.log("symbol is correct")
  15. }
  16. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement