Allow for JSONP style requests #16

moduscreate opened this Issue Mar 26, 2012 · 2 comments

2 participants


Json.success is somewhat limited, as in it only allows requests for direct ajax requests not JSONP.


A quick workaround is have your action do something like:

exports = function() {
var url =,
data = doCurlRequest(url);

var response = Json.encode({ data : data });
if ( {
    response = + '(' + response + ')';

return response;

Have that action called via a jst

<%= getMp3File() %>



The Json.success(), etc., methods should have that logic in them. An oversight on my part.

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