Plack::Middleware::JSONP - Wraps JSON response in JSONP if callback parameter is specified


Plack documentation  | view source Contained in the Plack distribution.

Index


NAME

Top

Plack::Middleware::JSONP - Wraps JSON response in JSONP if callback parameter is specified

SYNOPSIS

Top

    enable "JSONP", callback_key => 'jsonp';

DESCRIPTION

Top

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.

This middleware only works with a non-streaming response, and doesn't touch the response otherwise.

AUTHOR

Top

Tatsuhiko Miyagawa

SEE ALSO

Top

Plack


Plack documentation  | view source Contained in the Plack distribution.