Skip to content

Commit

Permalink
documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 13, 2012
1 parent 52919f6 commit e2ae7d4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/Server/Hypnotoad.pm
Expand Up @@ -360,7 +360,7 @@ To start applications with it you can use the L<hypnotoad> script.
$ hypnotoad myapp.pl
Server available at http://127.0.0.1:8080.
You can run the exact same command again for automatic hot deployment.
You can run the same command again for automatic hot deployment.
$ hypnotoad myapp.pl
Starting hot deployment for Hypnotoad server 31841.
Expand Down
20 changes: 10 additions & 10 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -850,7 +850,7 @@ L<Mojo::UserAgent::Transactor/"websocket">.
my $tx = $ua->delete('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<DELETE> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -874,7 +874,7 @@ proxy detection can be enabled with the C<MOJO_PROXY> environment variable.
my $tx = $ua->get('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<GET> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -890,7 +890,7 @@ append a callback to perform requests non-blocking.
my $tx = $ua->head('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<HEAD> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -912,7 +912,7 @@ Check if request for domain would use a proxy server.
my $tx = $ua->options('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<OPTIONS> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -928,7 +928,7 @@ append a callback to perform requests non-blocking.
my $tx = $ua->patch('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<PATCH> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -944,7 +944,7 @@ append a callback to perform requests non-blocking.
my $tx = $ua->post('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<POST> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand All @@ -960,7 +960,7 @@ append a callback to perform requests non-blocking.
my $tx = $ua->post_form('kraih.com', 'UTF-8', {a => 'b'}, {DNT => 1});
Perform blocking HTTP C<POST> request with form data and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"form">. You can also append a callback to
perform requests non-blocking.
Expand All @@ -976,7 +976,7 @@ perform requests non-blocking.
my $tx = $ua->post_json('kraih.com' => {a => 'b'} => {DNT => 1});
Perform blocking HTTP C<POST> request with JSON data and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"json">. You can also append a callback to
perform requests non-blocking.
Expand All @@ -992,7 +992,7 @@ perform requests non-blocking.
my $tx = $ua->put('http://kraih.com' => {DNT => 1} => 'Hi!');
Perform blocking HTTP C<PUT> request and return resulting
L<Mojo::Transaction::HTTP> object, takes the exact same arguments as
L<Mojo::Transaction::HTTP> object, takes the same arguments as
L<Mojo::UserAgent::Transactor/"tx"> (except for the method). You can also
append a callback to perform requests non-blocking.
Expand Down Expand Up @@ -1022,7 +1022,7 @@ non-blocking.
$ua->websocket('ws://localhost:3000' => {DNT => 1} => sub {...});
Open a non-blocking WebSocket connection with transparent handshake, takes the
exact same arguments as L<Mojo::UserAgent::Transactor/"websocket">.
same arguments as L<Mojo::UserAgent::Transactor/"websocket">.
$ua->websocket('ws://localhost:3000/echo' => sub {
my ($ua, $tx) = @_;
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -628,8 +628,7 @@ For more control you can also access request information directly.
$c = $c->redirect_to('/path');
$c = $c->redirect_to('http://127.0.0.1/foo/bar');
Prepare a C<302> redirect response, takes the exact same arguments as
C<url_for>.
Prepare a C<302> redirect response, takes the same arguments as C<url_for>.
# Conditional redirect
return $c->redirect_to('login') unless $c->session('user');
Expand Down
28 changes: 14 additions & 14 deletions lib/Test/Mojo.pm
Expand Up @@ -498,8 +498,8 @@ Opposite of C<content_type_like>.
$t = $t->delete_ok('/foo');
$t = $t->delete_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<DELETE> request and check for transport errors, takes the exact
same arguments as L<Mojo::UserAgent/"delete">.
Perform a C<DELETE> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"delete">.
=head2 C<element_exists>
Expand Down Expand Up @@ -528,15 +528,15 @@ Finish C<WebSocket> connection.
$t = $t->get_ok('/foo');
$t = $t->get_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<GET> request and check for transport errors, takes the exact same
Perform a C<GET> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"get">.
=head2 C<head_ok>
$t = $t->head_ok('/foo');
$t = $t->head_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<HEAD> request and check for transport errors, takes the exact same
Perform a C<HEAD> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"head">.
=head2 C<header_is>
Expand Down Expand Up @@ -632,8 +632,8 @@ Opposite of C<message_like>.
$t = $t->options_ok('/foo');
$t = $t->options_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<OPTIONS> request and check for transport errors, takes the exact
same arguments as L<Mojo::UserAgent/"options">.
Perform a C<OPTIONS> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"options">.
=head2 C<or>
Expand All @@ -650,15 +650,15 @@ Invoke callback if previous test failed.
$t = $t->patch_ok('/foo');
$t = $t->patch_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<PATCH> request and check for transport errors, takes the exact
same arguments as L<Mojo::UserAgent/"patch">.
Perform a C<PATCH> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"patch">.
=head2 C<post_ok>
$t = $t->post_ok('/foo');
$t = $t->post_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<POST> request and check for transport errors, takes the exact same
Perform a C<POST> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"post">.
=head2 C<post_form_ok>
Expand All @@ -667,7 +667,7 @@ arguments as L<Mojo::UserAgent/"post">.
$t = $t->post_form_ok('/foo' => 'UTF-8' => {a => 'b'} => {DNT => 1});
Perform a C<POST> request with form data and check for transport errors, takes
the exact same arguments as L<Mojo::UserAgent/"post_form">.
the same arguments as L<Mojo::UserAgent/"post_form">.
# Test file upload
$t->post_form_ok('/upload' => {foo => {content => 'bar'}})->status_is(200);
Expand All @@ -678,7 +678,7 @@ the exact same arguments as L<Mojo::UserAgent/"post_form">.
$t = $t->post_json_ok('/foo' => {a => 'b'} => {DNT => 1});
Perform a C<POST> request with JSON data and check for transport errors, takes
the exact same arguments as L<Mojo::UserAgent/"post_json">.
the same arguments as L<Mojo::UserAgent/"post_json">.
# Test JSON API
$t->post_json_ok('/hello.json' => {hello => 'world'})
Expand All @@ -690,7 +690,7 @@ the exact same arguments as L<Mojo::UserAgent/"post_json">.
$t = $t->put_ok('/foo');
$t = $t->put_ok('/foo' => {DNT => 1} => 'Hi!');
Perform a C<PUT> request and check for transport errors, takes the exact same
Perform a C<PUT> request and check for transport errors, takes the same
arguments as L<Mojo::UserAgent/"put">.
=head2 C<request_ok>
Expand Down Expand Up @@ -772,8 +772,8 @@ Opposite of C<text_like>.
$t = $t->websocket_ok('/echo');
$t = $t->websocket_ok('/echo' => {DNT => 1});
Open a C<WebSocket> connection with transparent handshake, takes the exact
same arguments as L<Mojo::UserAgent/"websocket">.
Open a C<WebSocket> connection with transparent handshake, takes the same
arguments as L<Mojo::UserAgent/"websocket">.
=head1 SEE ALSO
Expand Down

0 comments on commit e2ae7d4

Please sign in to comment.