CatalystX-ExtJS-Direct

 view release on metacpan or  search on metacpan

lib/CatalystX/Action/ExtJS/Serialize.pm  view on Meta::CPAN


=head1 VERSION

version 2.1.5

=head1 PUBLIC METHODS

=head2 execute

Wrap the serialized response in a textarea field if there was a file upload.
Furthermore set the C<content-type> to C<< text/html >>.

=cut

=head1 AUTHOR

Moritz Onken <onken@netcubed.de>

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by Moritz Onken.

lib/CatalystX/ExtJS/Tutorial/Direct.pm  view on Meta::CPAN

          len: 1
          name: echo
 type: remoting
 url: /api/router

This is the YAML representation of the API. As you can see, the C<add> method
expects two parameters and is inside the C<Calculator> class.

If you set the content type header to C<application/json> you will receive 
the JSON-encoded API.
Try L<http://localhost:3000/api?content-type=application/json> (see 
L<Catalyst::Controller::REST> to see why this is working).

A different way to access the API is to open L<http://localhost:3000/api/src>.
Open the C<index> template and add this to the head area:

 <script type="text/javascript" src="/api/src"></script>

The API is now available from the variable C<Ext.app.REMOTING_API>.

Fire up your favourite browser and go to L<http://localhost:3000/>.



( run in 0.851 second using v1.01-cache-2.11-cpan-524268b4103 )