Skip to content

Commit

Permalink
more form examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 3, 2012
1 parent 701245a commit 741158e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.75 2012-04-04
- Improved documentation.

2.74 2012-04-04
- Improved documentation.
- Improved tests.
Expand Down
5 changes: 5 additions & 0 deletions lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -281,6 +281,10 @@ implements the following new ones.
Versatile L<Mojo::Transaction::HTTP> builder for form requests.
# Inspect request
say $t->form('mojolicio.us' => {a => [1, 2, 3]})->req->to_string;
# Submit form and stream response
my $tx = $t->form('http://kraih.com/foo' => {a => 'b'});
$tx->res->body(sub { say $_[1] });
$ua->start($tx);
Expand All @@ -289,6 +293,7 @@ While the "multipart/form-data" content type will be automatically used
instead of "application/x-www-form-urlencoded" when necessary, you can also
enforce it by setting the header manually.
# Force multipart
my $tx = $t->form(
'http://kraih.com/foo',
{a => 'b'},
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -33,7 +33,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.74';
our $VERSION = '2.75';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down

0 comments on commit 741158e

Please sign in to comment.