Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added render_static example
  • Loading branch information
kraih committed Aug 18, 2014
1 parent 8fdb9a9 commit 3a67549
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -748,6 +748,10 @@ Render a static file using L<Mojolicious::Static/"serve">, usually from the
C<public> directories or C<DATA> sections of your application. Note that this
method does not protect from traversing to parent directories.
# Serve file with a custom content type
$c->res->headers->content_type('application/myapp');
$c->render_static('foo.txt');
=head2 render_to_string
my $output = $c->render_to_string('foo/index', format => 'pdf');
Expand Down

0 comments on commit 3a67549

Please sign in to comment.