- COPYRIGHT AND LICENSE
Jedi::Response - response object
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.
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://github.com/celogeek/perl-jedi/issues
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.
This software is copyright (c) 2013 by celogeek <email@example.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.