propublica/Capitol-Words

JSONP and CORS Issues

Opened this issue · 2 comments

Hi Guys,

I'm having two issues with the Capitol Words API using AngularJS. The first is that when I add a callback, ex. callback=JSON_CALLBACK, I get and error that it is undefined. Normally, I would assume it was an error on my part and move on, but it works perfectly with the Congress API.

So after a while I tried to enable CORS and use $http.get to retrieve the data, but I get an access is denied. Am I doing something wrong? I can get more information if you need it.

Thanks,

John

Just curious: what's your use case for using JSONP?

Can you post a jsfiddle with your issue?

Hello @johnalexhall85,
Here is a CapitolWords JSONP example you might find helpful http://jsfiddle.net/rover/2YW5B/