|
NAMEDancer::Plugin::Ajax - a plugin for adding Ajax route handlers VERSIONversion 1.3520 SYNOPSIS package MyWebApp;
use Dancer;
use Dancer::Plugin::Ajax;
ajax '/check_for_update' => sub {
# ... some Ajax code
};
dance;
DESCRIPTIONThe "ajax" keyword which is exported by this plugin allow you to define a route handler optimized for Ajax queries. The route handler code will be compiled to behave like the following:
CONFIGURATIONBy default the plugin will use a content-type of 'text/xml' but this can be overwritten with plugin setting 'content_type'. Here is example to use JSON: plugins:
'Ajax':
content_type: 'application/json'
AUTHORThis module has been written by Alexis Sukrieh <sukria@sukria.net> AUTHORDancer Core Developers COPYRIGHT AND LICENSEThis software is copyright (c) 2010 by Alexis Sukrieh. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|