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
14 See L<Catalyst::Application>.
18 The Catalyst Response.
24 Returns a hashref containing the cookies.
26 $c->response->cookies->{foo} = { value => '123' };
30 Returns a L<HTTP::Headers> object containing the headers.
32 $c->response->headers->header( 'X-Catalyst' => $Catalyst::VERSION );
36 Contains the final output.
38 $c->response->output('Catalyst rockz!');
42 Contains a location to redirect to.
44 $c->response->redirect('http://slashdot.org');
48 Contains the HTTP status.
50 $c->response->status(404);
54 Sebastian Riedel, C<sri@cpan.org>
58 This program is free software, you can redistribute it and/or modify it under
59 the same terms as Perl itself.