Mojo::UserAgent::Transactor man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Mojo::UserAgent::TransUserrContributed Perl DocuMojo::UserAgent::Transactor(3)

NAME
       Mojo::UserAgent::Transactor - User Agent Transactor

SYNOPSIS
	 use Mojo::UserAgent::Transactor;

	 my $t	= Mojo::UserAgent::Transactor->new;
	 my $tx = $t->tx(GET => 'http://mojolicio.us');

DESCRIPTION
       Mojo::UserAgent::Transactor is the transaction building and
       manipulation framework used by Mojo::UserAgent.	Note that this module
       is EXPERIMENTAL and might change without warning!

METHODS
       Mojo::UserAgent::Transactor inherits all methods from Mojo::Base and
       implements the following new ones.

   "form"
	 my $tx = $t->form('http://kraih.com/foo' => {test => 123});
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   'UTF-8',
	   {test => 123}
	 );
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   {test => 123},
	   {Accept => '*/*'}
	 );
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   'UTF-8',
	   {test => 123},
	   {Accept => '*/*'}
	 );
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   {mytext => {file => '/foo/bar.txt'}}
	 );
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   {mytext => {content => 'lalala'}}
	 );
	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   {myzip => {file => $asset, filename => 'foo.zip'}}
	 );

       Versatile Mojo::Transaction::HTTP builder for form requests.

	 my $tx = $t->form('http://kraih.com/foo' => {test => 123});
	 $tx->res->body(sub { print $_[1] });
	 $ua->start($tx);

       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.

	 my $tx = $t->form(
	   'http://kraih.com/foo',
	   {test => 123},
	   {'Content-Type' => 'multipart/form-data'}
	 );

   "peer"
	 my ($scheme, $host, $port) = $t->peer($tx);

       Actual peer for transaction.

   "proxy_connect"
	 my $tx = $t->proxy_connect($old);

       Build Mojo::Transaction::HTTP proxy connect request for transaction if
       possible.

   "redirect"
	 my $tx = $t->redirect($old);

       Build Mojo::Transaction::HTTP followup request for 301, 302, 303 or 307
       redirect response if possible.

   "tx"
	 my $tx = $t->tx(GET  => 'mojolicio.us');
	 my $tx = $t->tx(POST => 'http://mojolicio.us');
	 my $tx = $t->tx(GET  => 'http://kraih.com' => {Accept => '*/*'});
	 my $tx = $t->tx(POST => 'http://kraih.com' => {Accept => '*/*'} => 'Hi!');

       Versatile general purpose Mojo::Transaction::HTTP builder for requests.

	 # Streaming response
	 my $tx = $t->tx(GET => 'http://mojolicio.us');
	 $tx->res->body(sub { print $_[1] });
	 $ua->start($tx);

	 # Custom socket
	 my $tx = $t->tx(GET => 'http://mojolicio.us');
	 $tx->connection($socket);
	 $ua->start($tx);

   "websocket"
	 my $tx = $t->websocket('ws://localhost:3000');
	 my $tx =
	   $t->websocket('ws://localhost:3000' => {'User-Agent' => 'Agent 1.0'});

       Versatile Mojo::Transaction::WebSocket builder for WebSocket handshake
       requests.

SEE ALSO
       Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.

perl v5.14.1			  2011-09-13	Mojo::UserAgent::Transactor(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net