Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"latest" build not working in browser #10

Open
zernie opened this issue Jan 13, 2020 · 1 comment
Open

"latest" build not working in browser #10

zernie opened this issue Jan 13, 2020 · 1 comment

Comments

@zernie
Copy link

zernie commented Jan 13, 2020

cards.get("latest").then(function(cards) {
  console.log(cards[0]);
}).catch(console.error)

fails with index.js:1 TypeError: Failed to fetch, while providing a specific build number, e.g. 13619 works fine.

btw, README is a bit outdated, still showing how to use a callback api.

@Lightras
Copy link

Same problem here!
For me, the latest build is 58638, getLatest() or get(58638) gives "Failed to fetch" and this one:

"Access to fetch at 'https://api.hearthstonejson.com/v1/58638/enUS/cards.json' (redirected from 'https://api.hearthstonejson.com/v1/latest/enUS/cards.json') from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."

Getting the previous build (58213) works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants