IO::All::HTTP(3pm)
π IO::All::HTTP β bestie's guide to HTTP URLs in IO::All π
okay so this is the IO::All::HTTP page from the Perl docs (perl v5.32.0, dated 2021-01-04, and it lives in the User Contributed Perl Documentation section). it's short, it's sweet, and it makes HTTP URLs feel like just another file. periodt. π¦
β¨ NAME β¨
IO::All::LWP β extends IO::All to HTTP URLs. yes bestie, the NAME says IO::All::LWP even though the page is IO::All::HTTP. that's not a typo on my part, that's just how it is, we don't question it. π
πΈ SYNOPSIS πΈ
like, look at how cute this is:
use IO::All;
$content < io('http://example.org'); # GET webpage into scalar
io('http://example.org') > io('index.html'); # GET to file
"hello\n" > io('http://example.org/index.html'); # PUT webpage
# two ways of getting a page with a password:
$content < io('http://me:secret@example.org');
$content < io('http://example.org')->user('me')->password('secret');
no cap, that's the whole vibe. π
π DESCRIPTION π
so this module extends IO::All so it can deal with HTTP URLs. and here's the gag: you don't even have to use it explicitly, because IO::All autoloads it whenever it sees something that looks like an HTTP URL. it just knows. main character energy fr fr. π
the SYNOPSIS above shows the simple typical examples, but lowkey there are so many other interesting combinations with other IO::All features!! for example, you can GET an HTTP URL and then write that content to a socket, or to an FTP URL, or to a DBM file. the way that it just composes with everything?? obsessed. β¨
π METHODS π
this is a subclass of IO::All::LWP. the only new method is http, and you can use it to create a blank IO::All::HTTP object, or it can also take an HTTP URL as a parameter.
ngl though, in most cases it's simpler to just call io('http://example.com'), which calls the http method automatically for you. let the module do the work, bestie, you deserve it. π«Ά
π₯ OPERATOR OVERLOADING π₯
the same operators from IO::All still work here:
<β GETs an HTTP URL>β PUTs to an HTTP URL
that's it, that's the whole section. iconic. π
π SEE ALSO π
IO::AllIO::All::LWPLWP
go read those too, iykyk. π
π AUTHORS π
Ivan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org> β absolute legends, we stan. π
π COPYRIGHT π
Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
and that's the whole page!! π§ mwah, bye bestie β this was IO::All::HTTP(3pm) from perl v5.32.0, last touched 2021-01-04, straight out of the User Contributed Perl Documentation. slay. β¨ππ
π¦ where this page comes from
- debian bookworm: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libio-all-lwp-perl 0.14-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms