Skip to content

Commit

Permalink
make format detection examples more diverse
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 15, 2012
1 parent 2b1abd4 commit dbb1c52
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -580,17 +580,16 @@ Restrictive placeholders can also be used for format detection.
Or you can just disable format detection.
# /hello
get '/hello' => [format => 0] => {text => 'No format.'};
get '/hello' => [format => 0] => {text => 'No format detection.'};
# Disable format detection for the following routes
# Disable format detection for the following routes and allow re-enabling
under [format => 0];
# /foo
get '/foo' => {text => 'No format again.'};
get '/foo' => {text => 'No format detection again.'};
# /bar.txt
# /bar.html
get '/bar' => [format => ['txt', 'html']] => {text => 'Two formats.'};
get '/bar' => [format => 'txt'] => {text => ' Just one format.'};
=head2 Content negotiation
Expand Down

0 comments on commit dbb1c52

Please sign in to comment.