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

Callback support for JSONP #9

Open
Actinity opened this issue Mar 12, 2013 · 2 comments
Open

Callback support for JSONP #9

Actinity opened this issue Mar 12, 2013 · 2 comments

Comments

@Actinity
Copy link

Absolutely love this. Fantastic for playing around and sketching out APIs.

JSONP support is baked into jQuery and a few other libraries and seems fairly standardised around the notion that if you provide a callback parameter, the server should respond by wrapping the JSON response in that callback function e.g:

/api/mydata/?callback=myfunc

Returns

myfunc(jsondata);

With a text/javascript header rather than application/json

To me it looks like a pretty simple addition but just wondering if it had been considered and rejected for any reason?

@jacwright
Copy link
Owner

No, not rejected. Would love to have it.

@tyzoid
Copy link
Collaborator

tyzoid commented Jul 18, 2017

I've worked with similar systems that are essentially bi-directonal RPC frameworks (I'm looking at you, XAjax), which can be pretty cool. That said, I'm of the opinion that, since this can be accomplished quite easily using the built-in callback feature in javascript/jQuery, that this would not really add all that much of value for what it is.

As always, though, PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants