IO::Lambda::HTTP(3)
π IO::Lambda::HTTP(3) β http requests, lambda style π
okay so bestie, this is the IO::Lambda::HTTP(3) page β a Perl module that makes HTTP requests the lambda way β¨
πΈ NAME πΈ
IO::Lambda::HTTP β http requests lambda style, no cap π¦
π DESCRIPTION π
The module exports a single condition called http_request that accepts a HTTP::Request object plus a set of options as parameters. The way that it works: the condition returns either an HTTP::Response on success, or an error string otherwise. That's the whole vibe. Simple, iconic, periodt π
β¨ SYNOPSIS β¨
use HTTP::Request;
use IO::Lambda qw(:all);
use IO::Lambda::HTTP qw(http_request);
lambda {
context shift;
http_request {
my $result = shift;
if ( ref($result)) {
print "good: ", length($result-> content), " bytes\n";
} else {
print "bad: $result\n";
}
}
}-> wait(
HTTP::Request-> new( GET => "http://www.perl.com/")
);
literally the whole flow right there π«Ά
π API π
β http_request $HTTP::Request -> $HTTP::Response
http_request is a lambda condition that accepts a HTTP::Request object in the context. It returns either a HTTP::Response object on success, or an error string otherwise. That's the deal β ref check it and you'll know which one you got π
π¦ new $HTTP::Request :: () -> $HTTP::Response
See "new" in IO::Lambda::HTTP::Client π
π BUGS π
Non-blocking connects β and honestly, the whole module because of that β don't work on win32 on perl5.8.X, thanks to an under-implementation in ext/IO.xs. They do work on 5.10 however. so like... upgrade, bestie π
π SEE ALSO π
IO::Lambda::HTTP::Clientβ go read it, iykyk
π AUTHOR π
Dmitry Karasik, <dmitry@karasik.eu.org>. king behavior, fr fr π
that's the whole page, bestie β perl v5.42.2, dated 2026-02-15, served fresh by whoever packaged this gem π go make some requests, you got this π
π¦ where this page comes from
- alpine 3.24: perl-io-lambda-doc 1.34-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms