Skip to content

Commit

Permalink
more response header examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 25, 2015
1 parent d63c4af commit 2516f52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -763,6 +763,10 @@ Get L<Mojo::Message::Response> object from L</"tx">.
# Force file download by setting a custom response header
$c->res->headers->content_disposition('attachment; filename=foo.png;');
# Make sure response is cached correctly
$c->res->headers->cache_control('public, max-age=300');
$c->res->headers->append(Vary => 'Accept-Encoding');
=head2 respond_to
$c = $c->respond_to(
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Tutorial.pod
Expand Up @@ -74,7 +74,7 @@ L<Mojolicious::Guides::Cookbook/"DEPLOYMENT">.
=head2 Routes

Routes are basically just fancy paths that can contain different kinds of
placeholders, and usually lead to an action if they match the path part of the
placeholders and usually lead to an action, if they match the path part of the
request URL. The first argument passed to all actions C<$c> is a
L<Mojolicious::Controller> object containing both the HTTP request and
response.
Expand Down

0 comments on commit 2516f52

Please sign in to comment.