NAME

Langertha::Request::HTTP - A HTTP Request inside of Langertha

VERSION

version 0.303

SYNOPSIS

# Created internally by Langertha::Role::HTTP
my $request = Langertha::Request::HTTP->new(
    http => [ 'POST', $url, $headers, $body ],
    request_source => $engine,
    response_call  => sub { ... },
);

DESCRIPTION

A subclass of HTTP::Request that carries two extra pieces of Langertha context: the engine object that created the request (request_source) and a callback to parse the HTTP response into the appropriate return value (response_call).

Constructed internally by "generate_http_request" in Langertha::Role::HTTP and dispatched by Langertha::Role::Chat. You normally do not need to create these directly.

request_source

The engine object that created this request. Must consume Langertha::Role::HTTP.

response_call

A CodeRef that accepts an HTTP::Response and returns the parsed result expected by the caller. Invoked by "simple_chat" in Langertha::Role::Chat after a successful response.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de> https://raudss.us/

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.