NAME
Mojo::Transaction - HTTP Transactions
SYNOPSIS
use Mojo::Transaction;
my $tx = Mojo::Transaction->new;
my $req = $tx->req;
my $res = $tx->res;
my $keep_alive = $tx->keep_alive;
DESCRIPTION
Mojo::Transaction is a generic container for HTTP transactions.
ATTRIBUTES
Mojo::Transaction inherits all attributes from Mojo::Stateful and implements the following new ones.
connection
my $connection = $tx->connection;
$tx = $tx->connection($connection);
keep_alive
my $keep_alive = $tx->keep_alive;
my $keep_alive = $tx->keep_alive(1);
request
my $req = $tx->req;
my $req = $tx->request;
$tx = $tx->request(Mojo::Message::Request->new);
response
my $res = $tx->res;
my $res = $tx->response;
$tx = $tx->response(Mojo::Message::Response->new);
METHODS
Mojo::Transaction inherits all methods from Mojo::Stateful.