Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added growing guide
  • Loading branch information
kraih committed Dec 9, 2010
1 parent addd506 commit 5f9361c
Show file tree
Hide file tree
Showing 3 changed files with 724 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Mojolicious/Guides.pod
Expand Up @@ -5,10 +5,10 @@ Mojolicious::Guides - Mojolicious Guide To The Galaxy

=head1 DON'T PANIC!

These guides are currently being written, to get status updates and/or read
early drafts you can visit L<http://kraih.com>, L<http://twitter.com/kraih>
and L<http://github.com/kraih/mojo> or join the official IRC channel C<#mojo>
on C<irc.perl.org>.
We are constantly working on new documentation, follow us on
L<http://twitter.com/kraih> and L<http://github.com/kraih/mojo> or join the
official IRC channel C<#mojo> on C<irc.perl.org> to get all the latest
updates.

=head1 TUTORIAL

Expand All @@ -17,8 +17,6 @@ Mojolicious is the tutorial in L<Mojolicious::Lite>, you should take a look.

=head1 GUIDES

New guides will be added over time, so keep a close eye on this.

=over 4

=item L<Mojolicious::Guides::Routing>
Expand Down
17 changes: 17 additions & 0 deletions lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -236,6 +236,23 @@ manually in your application.

1;

=head1 CLIENT

When we say L<Mojolicious> is a web framework we actually mean it.

=head2 Streaming

Receiving a streaming response can be really tricky in most HTTP clients,
L<Mojo::Client> makes it actually easy.

my $client = Mojo::Client->new;
my $tx = $client->build_tx(GET => 'http://mojolicious.org');
$tx->res->body(sub { print $_[1] });
$client->start($tx);

The C<body> callback will be called for every chunk of data that is received,
C<chunked> encoding will be handled transparently.

=head1 HACKS

Fun hacks you might not use very often but that might come in handy some day.
Expand Down

0 comments on commit 5f9361c

Please sign in to comment.