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

Support JSONP responses #9

Closed
bhollis opened this issue Oct 1, 2011 · 4 comments
Closed

Support JSONP responses #9

bhollis opened this issue Oct 1, 2011 · 4 comments
Milestone

Comments

@bhollis
Copy link
Owner

bhollis commented Oct 1, 2011

JSONView can already parse JSONP responses, it just needs to handle JavaScript MIME types.

@afeld
Copy link

afeld commented Apr 3, 2013

Express.js's jsonp() method formats responses in the following way (or see a live example):

callbackName && callbackName({
  // ...
});

Would be nice to have this format recognized as JSONP by JSONView.

@bhollis
Copy link
Owner Author

bhollis commented Apr 3, 2013

Makes sense. The regex should be easy to modify, want to send a PR?

-Ben

Sent from my phone

On Apr 3, 2013, at 10:30 AM, Aidan Feldman notifications@github.com wrote:

Express.js's jsonp() method
http://expressjs.com/api.html#res.jsonpformats responses in the
following way (or see a live
examplehttp://omniembed.herokuapp.com/v1.json?callback=foo&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3Yuqxl284cg
):

callbackName && callbackName({
// ...});

Would be nice to have this format recognized as JSONP by JSONView.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/9#issuecomment-15851148
.

@neoascetic
Copy link

+1

@bhollis
Copy link
Owner Author

bhollis commented Feb 25, 2015

These days I can't say I have any use for JSONP in general - CORS is a much better solution. I'm also not interested in chasing down every variant on a "JSONP" response that a different web server might produce. Furthermore, I can't really see JSONView ever being the viewer responsible for text/javascript or application/javascript content. I'm going to close this feature request and likely remove what JSONP support exists in JSONView for the next release.

@bhollis bhollis closed this as completed Feb 25, 2015
bhollis added a commit that referenced this issue May 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants