Axios: It seems axios does not support jsonp call

Created on 7 Jun 2016  ·  3Comments  ·  Source: axios/axios

I am trying to use axios to send jsonp call by setting dataType="jsonp" in the config field, but it returns error like "No 'Access-Control-Allow-Origin' header is present on the requested resource." I finally figured out the reason is axios does not support jsonp calls. I am wondering if there is any plan to add the jsonp support.

Thanks.
shaosh

Most helpful comment

And this is how you screw a good library.

All 3 comments

There are no plans to add support for JSONP. I would suggest you to consider using CORS for cross-domain requests instead.

And this is how you screw a good library.

And this is how you screw a good library.

Yes and no.

Jsonp is a wide-spreaded hack for what CORS is. You can't go wrong with not implementing hack solutions, but on the other hand you either won't avoid people's rage since 99.99% of developers expect any request lib to support that feature.

There are a lot of things that could be done better in the past. but we suffer from it today (like FTP protocol). I am waiting for Filezilla to stop using FTP and force people to buy servers with hucking SSH/SFTP access to it ffs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

helmus picture helmus  ·  3Comments

ildella picture ildella  ·  3Comments

altruisticsoftware picture altruisticsoftware  ·  3Comments

Spartano picture Spartano  ·  3Comments

Adman picture Adman  ·  3Comments