NAME
Mojo::Transaction::Single - HTTP Transaction Container
SYNOPSIS
use Mojo::Transaction::Single;
my $tx = Mojo::Transaction::Single->new;
my $req = $tx->req;
my $res = $tx->res;
my $keep_alive = $tx->keep_alive;
DESCRIPTION
Mojo::Transaction::Single is a container for HTTP transactions.
ATTRIBUTES
Mojo::Transaction::Single inherits all attributes from Mojo::Transaction and implements the following new ones.
continued
my $continued = $tx->continued;
$tx = $tx->continued(1);
keep_alive
my $keep_alive = $tx->keep_alive;
$tx = $tx->keep_alive(1);
req
my $req = $tx->req;
$tx = $tx->req(Mojo::Message::Request->new);
res
my $res = $tx->res;
$tx = $tx->res(Mojo::Message::Response->new);
METHODS
Mojo::Transaction::Single inherits all methods from Mojo::Transaction and implements the following new ones.
client_connect
$tx = $tx->client_connect;
client_connected
$tx = $tx->client_connected;
client_get_chunk
my $chunk = $tx->client_get_chunk;
client_info
my ($scheme, $host, $port) = $tx->client_info;
client_leftovers
my $leftovers = $tx->client_leftovers;
client_read
$tx = $tx->client_read($chunk);
client_spin
$tx = $tx->client_spin;
client_written
$tx = $tx->client_written($length);
new_delete
my $tx = Mojo::Transaction::Single->new_delete('http://127.0.0.1',
User-Agent => 'Mojo'
);
my $tx = Mojo::Transaction::Single->new_delete('http://127.0.0.1', {
User-Agent => 'Mojo'
});
new_get
my $tx = Mojo::Transaction::Single->new_get('http://127.0.0.1',
User-Agent => 'Mojo'
);
my $tx = Mojo::Transaction::Single->new_get('http://127.0.0.1', {
User-Agent => 'Mojo'
});
new_head
my $tx = Mojo::Transaction::Single->new_head('http://127.0.0.1',
User-Agent => 'Mojo'
);
my $tx = Mojo::Transaction::Single->new_head('http://127.0.0.1', {
User-Agent => 'Mojo'
});
new_post
my $tx = Mojo::Transaction::Single::Single->new_post('http://127.0.0.1',
User-Agent => 'Mojo'
);
my $tx = Mojo::Transaction::Single::Single->new_post('http://127.0.0.1', {
User-Agent => 'Mojo'
});
new_put
my $tx = Mojo::Transaction::Single->new_put('http://127.0.0.1',
User-Agent => 'Mojo'
);
my $tx = Mojo::Transaction::Single->new_put('http://127.0.0.1', {
User-Agent => 'Mojo'
});
server_accept
$tx = $tx->server_accept;
server_get_chunk
my $chunk = $tx->server_get_chunk;
server_handled
$tx = $tx->server_handled;
server_read
$tx = $tx->server_read($chunk);
server_spin
$tx = $tx->server_spin;
server_written
$tx = $tx->server_written($bytes);