import {fetch} from 'wix-fetch'; google-site-verification=FeBbiX-35t_7XUT1uNOtxHzeeMiWapNLhv1nlsrN8IU // ... fetch("https://exchangeratesapi.io/api/latest", {method: "get"}) .then( (httpResponse) => { let url = httpResponse.url; let statusCode = httpResponse.status; let statusText = httpResponse.statusText; let headers = httpResponse.headers; let bodyUsed = httpResponse.bodyUsed; if (httpResponse.ok) { return httpResponse.json(); } else { return Promise.reject("Fetch did not succeed"); } } ) .then( (json) => { console.log(json.rates["USD"]); } ) .catch( (err) => { console.log(err); } ); Aaron Briggs Sr | Forum Comments
top of page

Forum Comments

I Have No Forum Comments Yet
Check back soon.

Aaron Briggs Sr

Forum Moderator

Owner

More actions
bottom of page