Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

When passing jsonp parameter, the API returns "application/json" instead of "application/javascript".

I found this because if you do:

<script src='http://api.stackoverflow.com/1.0/badges?jsonp=results'></script>

On Google Chrome, it doesn't work. You need to add

<script src='http://api.stackoverflow.com/1.0/badges?jsonp=results' type='text/javascript'></script>

And even then you get a warning in the console.

Nothing serious but it's not a big change either.

share|improve this question
add comment

1 Answer

Its odd that no-one complained about this oversight for so long, good catch.

This has been deployed to the API, StackAuth will follow sometime in the near-ish future.

share|improve this answer
1  
maybe not a lot of people are using the jsonp variant of the API –  Pablo Fernandez Oct 11 '10 at 19:55
    
@Pablo: Well, I'm not too sure about that - I'm using it quite a bit. –  Nathan Osman Nov 10 '10 at 22:13
    
@pablo's statement that 'it doesn't work' is incorrect. the content-type may not be correct but chrome handles it just fine, with a warning. both george and i have been leveraging jsonp since day 1 with full browser support. –  Sky Sanders Nov 12 '10 at 2:18
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .