Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { create } from 'apisauce';
- //config is case sensitive durning the pair programming session I wrote 'baseUrl' instead of 'baseURL'
- const api = create({
- baseURL: 'http://blockchain.info',
- });
- (async () => {
- const response = await api.get("/ticker");
- console.log("response: " + response.status);
- console.log("status: " + response.ok);
- if (response.data.PLN.symbol === "zł") {
- console.log("symbol is correct")
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement