Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 14, 2012
1 parent 0c38458 commit 2a0bfb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -3,6 +3,7 @@
- Added support for MIME type prioritization to Mojolicious::Types.
- Improved respond_to to prioritize multiple MIME types if the
X-Requested-With header is set to the value "XMLHttpRequest".
- Improved documentation.

3.66 2012-12-14
- Added request_ok method to Test::Mojo.
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -788,10 +788,10 @@ Get L<Mojo::Message::Response> object from L<Mojo::Transaction/"res">.
Automatically select best possible representation for resource from C<Accept>
request header, C<format> stash value or C<format> GET/POST parameter,
defaults to rendering an empty C<204> response. Unspecific C<Accept> request
headers that contain more than one MIME type are currently ignored, unless the
C<X-Requested-With> header is set to the value C<XMLHttpRequest>, since
browsers often don't really know what they actually want.
defaults to rendering an empty C<204> response. Since browsers often don't
really know what they actually want, unspecific C<Accept> request headers with
more than one MIME type will be ignored, unless the C<X-Requested-With> header
is set to the value C<XMLHttpRequest>.
$c->respond_to(
json => sub { $c->render_json({just => 'works'}) },
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Types.pm
Expand Up @@ -135,8 +135,8 @@ the following ones.
Detect file extensions from C<Accept> header value, prioritization of
unspecific values that contain more than one MIME type is disabled by default.
# List detected extensions
say for @{$types->detect('application/json')};
# List detected extensions prioritized
say for @{$types->detect('application/json, text/xml;q=0.1', 1)};
=head2 C<type>
Expand Down

0 comments on commit 2a0bfb7

Please sign in to comment.