NAME
Thunderhorse::Request - Request wrapper for Thunderhorse
SYNOPSIS
async sub show ($self, $ctx, $id)
{
my $param = $ctx->req->param('name');
my $method = $ctx->req->method;
my $body = await $ctx->req->json;
}
DESCRIPTION
Thunderhorse::Request is a thin wrapper around PAGI::Request that integrates with Thunderhorse::Context. It provides access to all HTTP request data including headers, query parameters, cookies, and request body.
This class extends PAGI::Request and mixes in Thunderhorse::Message to provide context integration.
INTERFACE
Inherits all interface from PAGI::Request, and adds the interface documented below.
Attributes
context
The Thunderhorse::Context object for this request (weakened).
Required in the constructor
Methods
new
$object = $class->new(%args)
Standard Mooish constructor. Consult "Attributes" section for available constructor arguments.
update
$req->update()
Updates the internal PAGI scope and receiver from the context's PAGI tuple. Called automatically when the context's PAGI tuple changes via setter of "pagi" in Thunderhorse::Context.