Share your thoughts on World Bank Data

JSONP returns text/plain instead of application/javascript MIME type

The World Bank API currently returns data in a "text/plain" content-type instead of an "application/javascript" (or JSON) content-type, thereby resulting in an error when fetching the data through JavaScript in modern browsers with the 'format' parameter set to JSONP.

(error: "Refused to execute script because its MIME type (text/plain) is not executable, and strict MIME type checking is enabled")

(link to try: https://api.worldbank.org/countries/kor;aus;btn;mac/indicators/NE.IMP.GNFS.ZS?date=1995:2017&format=jsonp&prefix=test )

Thank you for looking into this! Much appreciated.

7 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    VarTrade shared this idea  ·   ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Raül commented  · 

        I found the same problem. The application that I developed does not work. Is there anything we can do or is it a problem only of the World Bank API? Thank you.

      Thank you for visiting the World Bank's Data Help Desk. Please review the terms of use for this website. Your continued use of this website constitutes your acceptance of these terms and conditions.

      Developer Info

      Feedback and Knowledge Base