markitondemand / DEPRECATED-DataApis

Markit On Demand - Market Data APIs
http://dev.markitondemand.com
MIT License
178 stars 68 forks source link

Access-Control-Allow-Origin:* #9

Closed Pushkar-chintaluri closed 9 years ago

Pushkar-chintaluri commented 10 years ago

Hi Guys,

Can you please look into setting a response header as follows to all responses:

Access-Control-Allow-Origin:*

This is bypass the Cross Reference blockages that browsers create for JS code.

Please let me know if you have any questions.

Thanks, Pushkar header

PS: Great job though - however my test has failed. I always try VIPS symbol for a response, your services do not cater to it... But it is still consistent and great!!

sahas- commented 9 years ago

Hello, I'm down with the same issue. Is there an alternate suggestion to talk to these services from js?

markhealey commented 9 years ago

The only thing I can recommend right now is making the HTTP request from your app on the server rather than in the browser. We do not have any scheduled updates for these APIs.

swaroopjo commented 9 years ago

ok That works after i change to Jsonp. I am still using AngularJS though.

Here is what i have done for reference

var JSON_CALLBACK = function(response){ console.log("Callback function called"); };

$http.jsonp("http://dev.markitondemand.com/Api/v2/Lookup/jsonp?input=G&&callback=JSON_CALLBACK").success(function(response){ console.log("Data Received: "+response); showResult(response) }) .error(function(){ console.log("Error Occured !!."); });