1 package Catalyst::Request;
4 use base 'Class::Accessor::Fast';
6 __PACKAGE__->mk_accessors(
7 qw/action arguments base cookies headers match method parameters path
12 *params = \¶meters;
16 Catalyst::Request - Catalyst Request Class
32 print $c->request->action;
34 =head3 arguments (args)
36 Returns an arrayref containing the arguments.
38 print $c->request->arguments->[0];
42 Contains the uri base.
46 Returns a hashref containing the cookies.
48 print $c->request->cookies->{mycookie}->value;
52 Returns a L<HTTP::Headers> object containing the headers.
54 print $c->request->headers->header('X-Catalyst');
60 print $c->request->match;
62 =head3 parameters (params)
64 Returns a hashref containing the parameters.
66 print $c->request->parameters->{foo};
72 print $c->request->path;
76 Contains the request method.
78 print $c->request->method
82 Returns an arrayref containing regex snippets.
84 my @snippets = @{ $c->request->snippets };
88 Returns a hashref containing the uploads.
90 my $filename = $c->req->parameters->{foo};
91 print $c->request->uploads->{$filename}->{type};
92 print $c->request->uploads->{$filename}->{size};
93 my $fh = $c->request->uploads->{$filename}->{fh};
94 my $content = do { local $/; <$fh> };
98 Sebastian Riedel, C<sri@cpan.org>
102 This program is free software, you can redistribute it and/or modify it under
103 the same terms as Perl itself.