AnyEve...Client(3pm)
π NAME π
AnyEvent::HTTP::ScopedClient β an AnyEvent-based lil bestie that speaks fluent https://github.com/technoweenie/node-scoped-http-client π¦
okay so this is the AnyEve...Client(3pm) page, and yes the header truncated the name like that, iconic behaviour, we move π
β¨ VERSION β¨
version 0.0.5 π
πΈ SYNOPSIS πΈ
here's the whole vibe, bestie β copy it character for character, no editing, fr fr:
my $client = AnyEvent::HTTP::ScopedClient->new('http://example.com');
$client->request('GET', sub {
my ($body, $hdr) = @_; # $body is undef if error occured
return if ( !$body || $hdr->{Status} !~ /^2/ );
# do something;
});
# shorcut for GET
$client->get(sub {
my ($body, $hdr) = @_;
# ...
});
# Content-Type: application/x-www-form-urlencoded
$client->post(
{ foo => 1, bar => 2 }, # note this.
sub {
my ($body, $hdr) = @_;
# ...
}
);
# application/x-www-form-urlencoded post request
$client->post(
"foo=1&bar=2" # and note this.
sub {
my ($body, $hdr) = @_;
# ...
}
);
# Content-Type: application/json
use JSON::XS;
$client->header('Content-Type', 'application/json')
->post(
encode_json({ foo => 1 }),
sub {
my ($body, $hdr) = @_;
# ...
}
);
$client->header('Accept', 'application/json')
->query({ key => 'value' })
->query('key', 'value')
->get(
sub {
my ($body, $hdr) = @_;
# ...
}
);
# headers at once
$client->header({
Accept => '*/*',
Authorization => 'Basic abcd'
})->get(
sub {
my ($body, $hdr) = @_;
# ...
}
);
like, look at the chaining. the way that header β query β query β get just flows?? main character energy, honestly πβ¨
π¦ DESCRIPTION π¦
AnyEvent::HTTP wrapper π«Ά
that's it. that's the whole description. short king behaviour but it's doing exactly what it says on the tin, periodt π
π SEE ALSO π
π AUTHOR π
Hyungsuk Hong <hshong@perl.kr> π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Hyungsuk Hong.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
free software besties, you can redistribute and/or modify it under the same terms as the Perl 5 programming language system itself β go off π
okay that's the whole page, we ate and left no crumbs π this was perl v5.34.0, dated 2022-06-05, and it lives under the AnyEve...Client(3pm) header. mwah π π§
π¦ where this page comes from
- debian bookworm: libanyevent-http-scopedclient-perl 0.0.5-3 Β· Artistic-1.0-Perl OR GPL-1.0-only
- debian trixie: libanyevent-http-scopedclient-perl 0.0.5-3 Β· Artistic-1.0-Perl OR GPL-1.0-only
- ubuntu noble: libanyevent-http-scopedclient-perl 0.0.5-3 Β· Artistic-1.0-Perl OR GPL-1.0-only
- ubuntu resolute: libanyevent-http-scopedclient-perl 0.0.5-3 Β· Artistic-1.0-Perl OR GPL-1.0-only
- ubuntu stonking: libanyevent-http-scopedclient-perl 0.0.5-3 Β· Artistic-1.0-Perl OR GPL-1.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms