1 package Catalyst::Response;
4 use base 'Class::Accessor::Fast';
6 __PACKAGE__->mk_accessors(qw/cookies headers output redirect status/);
10 Catalyst::Response - Catalyst Response Class
21 See also L<Catalyst::Application>.
25 This is the Catalyst Response class, which provides a set of accessors to
34 Returns a reference to a hash containing the cookies.
36 $c->response->cookies->{foo} = { value => '123' };
40 Returns a L<HTTP::Headers> object containing the headers.
42 $c->response->headers->header( 'X-Catalyst' => $Catalyst::VERSION );
44 =item $resp->output($text)
46 Contains the final output.
48 $c->response->output('Catalyst rockz!');
50 =item $resp->redirect($url)
52 Contains a location to redirect to.
54 $c->response->redirect('http://slashdot.org');
58 Contains the HTTP status.
60 $c->response->status(404);
66 Sebastian Riedel, C<sri@cpan.org>
70 This program is free software, you can redistribute it and/or modify it under
71 the same terms as Perl itself.