JavaScript is required to use Bungie.net

OffTopic

Surf a Flood of random discussion.
originally posted in:BungieNetPlatform
9/2/2014 11:14:33 AM
2

API Proxy

Having trouble with JavaScript requests and CORS in browsers? Fear no more, simply replace http://www.bungie.net/platform with http://bungie-platform.herokuapp.com/proxy. The API Proxy works on node and simply proxies your request to the bungie.net/platform while removing the CORS headers. It also forwards cookies (hooray!). [b]API Explorer[/b] If you want to simply look what is available for API Endpoints you don't have to write your own client. I tried parsing the endpoints file and with a bit of code the API Explorer was alive: http://bungie-platform.herokuapp.com/api/explorer. I still need to map out some things so one knows what to actually put into the generated fields BUT right now I think it already works pretty well. Cheers and have fun o/ Sargo

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
  • Hey, I was wondering if you could give me a hand with this. I'm trying to use the herokuapp to overcome the CORS issue, but I'm getting the following message: [quote]XMLHttpRequest cannot load http://bungie-platform.herokuapp.com/proxy/User/SearchUsers/?q=FraserBaws. Request header field X-API-Key is not allowed by Access-Control-Allow-Headers in preflight response.[/quote] I'm using the following jQuery AJAX call: [quote] $.ajax({ type: 'GET', beforeSend: function (request) { request.setRequestHeader("X-API-Key", apiKey); }, url: 'http://bungie-platform.herokuapp.com/proxy/User/SearchUsers/?q=FraserBaws', success: function( data ) { response(data.Response); } });[/quote] Any idea why I may be getting this message? Any help is greatly appreciated.

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    2 Replies
    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon