Eve::HttpResponse - an HTTP response abstract class.
use Eve::HttpResponse::Implementation; $response->set_status(code => 302); $response->set_header(name => 'Location', value => '/other'); $response->set_cookie( name => 'cookie1', value => 'value', domain => '.example.com', path => '/some/', expires => '+1d', secure = >1); $response->set_body(text => 'Hello world!'); print $response->get_text();
The class is an interface defining abstraction that is required to be used as a parent class for various HTTP response implementations.
Sets or overwrites an HTTP header of the response.
name
value
Sets or overwrites the HTTP response status.
code
Sets an HTTP response cookie.
domain
path
expires
secure
(optional) defaults to false
Sets or overwrites the HTTP response body.
text
The HTTP response as text.
Eve::Class
Copyright 2012 Igor Zinovyev.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Eve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eve
CPAN shell
perl -MCPAN -e shell install Eve
For more information on module installation, please visit the detailed CPAN module installation guide.