Plack::Middleware::JSONP - Wraps JSON response in JSONP if callback parameter is specified
enable "JSONP", callback_key => 'jsonp';
Plack::Middleware::JSONP wraps JSON response, which has Content-Type value either text/javascript or application/json as a JSONP response which is specified with the callback query parameter. The name of the parameter can be set while enabling the middleware.
text/javascript
application/json
callback
This middleware only works with a non-streaming response, and doesn't touch the response otherwise.
Tatsuhiko Miyagawa
Plack
To install Plack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack
CPAN shell
perl -MCPAN -e shell install Plack
For more information on module installation, please visit the detailed CPAN module installation guide.