Open moduscreate opened 12 years ago
A quick workaround is have your action do something like:
exports = function() { var url = req.data.url, data = doCurlRequest(url);
var response = Json.encode({ data : data });
if (req.data.callback) {
response = req.data.callback + '(' + response + ')';
}
return response; };
Have that action called via a jst
<%= getMp3File() %>
Yikes.
The Json.success(), etc., methods should have that logic in them. An oversight on my part.
Json.success is somewhat limited, as in it only allows requests for direct ajax requests not JSONP.