Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems axios does not support jsonp call #342

Closed
shaosh opened this issue Jun 7, 2016 · 3 comments
Closed

It seems axios does not support jsonp call #342

shaosh opened this issue Jun 7, 2016 · 3 comments

Comments

@shaosh
Copy link

shaosh commented Jun 7, 2016

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

@nickuraltsev
Copy link
Member

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

@Frondor
Copy link

Frondor commented Jul 15, 2017

And this is how you screw a good library.

@ProteanCode
Copy link

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.

@axios axios locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants