Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mention query string as well
  • Loading branch information
kraih committed Jul 29, 2014
1 parent 30b2723 commit 975eb27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Message/Request.pm
Expand Up @@ -400,7 +400,7 @@ Check C<X-Requested-With> header for C<XMLHttpRequest> value.
my @foo = $req->param('foo');
my ($foo, $bar) = $req->param(['foo', 'bar']);
Access C<GET> and C<POST> parameters extracted from
Access C<GET> and C<POST> parameters extracted from the query string and
C<application/x-www-form-urlencoded> or C<multipart/form-data> message body.
Note that this method caches all data, so it should not be called before the
entire request body has been received. Parts of the request body need to be
Expand All @@ -411,7 +411,7 @@ not excessively large, there's a 10MB limit by default.
my $params = $req->params;
All C<GET> and C<POST> parameters extracted from
All C<GET> and C<POST> parameters extracted from the query string and
C<application/x-www-form-urlencoded> or C<multipart/form-data> message body,
usually a L<Mojo::Parameters> object. Note that this method caches all data,
so it should not be called before the entire request body has been received.
Expand Down
17 changes: 9 additions & 8 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -598,13 +598,14 @@ status.
$c = $c->param(foo => ['ba;r', 'baz']);
Access route placeholder values that are not reserved stash values, file
uploads as well as C<GET> and C<POST> parameters extracted from
C<application/x-www-form-urlencoded> or C<multipart/form-data> message body,
in that order. Note that this method is context sensitive in some cases and
therefore needs to be used with care, there can always be multiple values,
which might have unexpected consequences. Parts of the request body need to be
loaded into memory to parse C<POST> parameters, so you have to make sure it is
not excessively large, there's a 10MB limit by default.
uploads as well as C<GET> and C<POST> parameters extracted from the query
string and C<application/x-www-form-urlencoded> or C<multipart/form-data>
message body, in that order. Note that this method is context sensitive in
some cases and therefore needs to be used with care, there can always be
multiple values, which might have unexpected consequences. Parts of the
request body need to be loaded into memory to parse C<POST> parameters, so you
have to make sure it is not excessively large, there's a 10MB limit by
default.
# List context is ambiguous and should be avoided, you can get multiple
# values returned for a query string like "?foo=bar&foo=baz&foo=yada"
Expand Down Expand Up @@ -946,7 +947,7 @@ to inherit query parameters from the current request.
my $validation = $c->validation;
Get L<Mojolicious::Validator::Validation> object for current request to
validate C<GET> and C<POST> parameters extracted from
validate C<GET> and C<POST> parameters extracted from the query string and
C<application/x-www-form-urlencoded> or C<multipart/form-data> message body.
Parts of the request body need to be loaded into memory to parse C<POST>
parameters, so you have to make sure it is not excessively large, there's a
Expand Down

0 comments on commit 975eb27

Please sign in to comment.