jsonp

19 views
Skip to first unread message

armand...@googlemail.com

unread,
Mar 24, 2014, 11:17:44 AM3/24/14
to tot...@googlegroups.com
Hi,
How to get a controller to handle jsonp response?

self.json(self.req.data.get.callback + '(' + JSON.stringify(data) + ');');
does not work.

thanks

Peter Širka

unread,
Mar 24, 2014, 2:48:23 PM3/24/14
to tot...@googlegroups.com
Hi Armand,
try to use:

self.content(self.req.data.get.callback + '(' + JSON.stringify(data) + ');', 'application/json');

Thanks :-)

Armand Turpel

unread,
Mar 25, 2014, 4:49:41 AM3/25/14
to tot...@googlegroups.com
Many thanks! It works.
Reply all
Reply to author
Forward
0 new messages