I'm trying to retrieve poll results in JSON via javascript. However, due to CORS I have to use JSONP to do the request. Due to the nature of JSONP, you can't specify header values (to be able to specify that the request only accepts JSON).
Because I can't specify to receive a JSON response, I get the full HTML page back (what you see when you visit that page in the browser)
The following works:
As does:
But this does not (it returns HTML):
Is there an API URL I can hit that will always return JSON regardless of the headers sent?
Thanks.