Jedi::Response - Jedi Response
version 0.11
This is the response you will have to fill from route to route.
Status code, by default is 404 (not found).
You can consult the HTTP status but here some common :
500: internal server error 404: route not found 405: access forbidden 204: no content 200: status ok, with content 302: redirect 301: permanent redirect
This contain the headers you will send with your response.
You should use the method set_header and push_header instead of filling this attribute directly.
The attribute has this form :
key => [val1, val2 ...], key2 => [val4],
The body is the string return to the browser.
$response->body("Hello World !");
Set an header to a specific value.
$response->set_header('X-AUTH', $token); $response->set_header('Location', 'http://blog.celogeek.com');
Push an header to a specific value
$response->push_header('Set-Cookie', 'myCookie=a'); $response->push_header('Set-Cookie', 'myCookie2=b');
You will see :
Set-Cookie: myCookie=a Set-Cookie: myCookie=b
This return the content in a psgi form.
It is use by Jedi to transform the response into a valid psgi response.
Please report any bugs or feature requests on the bugtracker website https://tasks.celogeek.com/projects/perl-modules-jedi
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
celogeek <me@celogeek.com>
This software is copyright (c) 2013 by celogeek <me@celogeek.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Jedi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Jedi
CPAN shell
perl -MCPAN -e shell install Jedi
For more information on module installation, please visit the detailed CPAN module installation guide.