[Solved]Retrieve /v2 text page...?

[Solved]Retrieve /v2 text page...?

in API Development

Posted by: Tshakaar.6429

Tshakaar.6429

Some times ago, I tried to retrieve the page https://api.guildwars2.com/v2 without success.

I tried $.getJSON() and many other things, don’t remember everything.
Before taking time to re-test that, i was wondering if anybody has the answer before.

Thank you!

[Solved]Retrieve /v2 text page...?

in API Development

Posted by: Tornupto.2304

Tornupto.2304

Maybe the reason was, that there was nothing to retrieve? API was down for 1 to 3 days.
https://forum-en.gw2archive.eu/forum/community/api/HEADS-UP-API-temporarily-down/

[Solved]Retrieve /v2 text page...?

in API Development

Posted by: darthmaim.6017

darthmaim.6017

That page is made for humans to view directly and doesn’t have Access-Control-Allow-Origin headers. You probably want to load https://api.guildwars2.com/v2.json instead if you want to process it with javascript.

[Solved]Retrieve /v2 text page...?

in API Development

Posted by: Tshakaar.6429

Tshakaar.6429

API was down for 1 to 3 days.

When i say “some times ago”, it was more than 3 weeks ago. I know about this down time.

That page is made for humans to view directly and doesn’t have Access-Control-Allow-Origin headers. You probably want to load https://api.guildwars2.com/v2.json instead if you want to process it with javascript.

I’m sure i tried with .txt, maybe .htm and .html and… !! How did i forget about .json? I’ll try next time. Thank you.

EDIT: retrieving /V2.json is perfect and even better. Feel so dumb i didn’t try “.json” when i tried some extensions…

(edited by Tshakaar.6429)