Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
better Content-Type examples
  • Loading branch information
kraih committed Sep 1, 2013
1 parent 53c1fc7 commit 0c1f58e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -256,8 +256,12 @@ Response status codes can be changed with the C<status> stash value.
The C<Content-Type> header of the response is actually based on the MIME type
mapping of the C<format> stash value.

# Content-Type: text/plain
$self->render(text => 'Hello.', format => 'txt');

# Content-Type: image/png
$self->render(data => $bytes, format => 'png');

These mappings can be easily extended or changed with L<Mojolicious/"types">.

# Application
Expand Down

0 comments on commit 0c1f58e

Please sign in to comment.