HTTP::Thin(3pm)

πŸ“¦
version 0.006 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– HTTP::Thin πŸ’–

okay so bestie, welcome to HTTP::Thin β€” the manual page for it, anyway (it's the HTTP::Thin(3pm) page, if you're keeping track of paperwork). The vibe? It's a thin little wrapper. Tiny. Petite. Lowkey doing the most with the least. Let's get into it 🫢


✨ VERSION ✨

version 0.006 β€” yeah she's on 0.006, don't @ me


✨ SYNOPSIS ✨

here's the whole entire flex, look at how short it is:

use 5.12.1;
use HTTP::Request::Common;
use HTTP::Thin;

say HTTP::Thin->new()->request(GET 'http://example.com')->as_string;

like. that's IT. that's the whole thing. iconic behavior πŸ’…


✨ DESCRIPTION ✨

WARNING: This module is untested beyond the very basics. The implementation is simple enough that it shouldn't do evil things but, yeah it's still not approved for use by small children.

not me starting with the warning but FR FR, read it. It's untested past the very basics. The implementation is simple enough that it shouldn't do anything evil, but like... it's still not approved for use by small children. So. Take that as you will πŸ™ˆ

okay so the actual tea: HTTP::Thin is a thin wrapper around HTTP::Tiny, and what it adds is the ability to hand it HTTP::Request objects and get HTTP::Response objects back. That's it. That's the whole personality.

the drama is that the maintainers of HTTP::Tiny β€” justifiably!! β€” don't wanna be on the hook for maintaining compatibility, but a whole bunch of other projects out there already consume HTTP::Message objects. So this module is just glue code, doing what glue code does best πŸŽ€


✨ METHODS ✨

🌸 request

besides all the parameters that are already documented over in HTTP::Tiny, HTTP::Thin ALSO takes HTTP::Request objects. bestie said "why not both" πŸ’œ

and the return value? an HTTP::Response object. slay.


✨ WHY? ✨

okay this is my favorite part. A conversation on IRC happened, and mst, ether, and the author all agreed this would be a useful module... but probably not worth the effort. So obviously they wrote it anyway, purely to get it out of their head. main character energy honestly πŸ‘‘


✨ AUTHOR ✨

Chris Prather <chris@prather.org> πŸ’–


This software is copyright (c) 2013 by Chris Prather.

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


✨ CONTRIBUTORS ✨

  • Aran Deltac <aran@ziprecruiter.com>
  • Tatsuhiko Miyagawa <miyagawa@bulknews.net>

and that's the whole page, bestie!! this little beauty shipped as part of perl v5.34.0, dated 2022-06-14, under the name HTTP::Thin(3pm). go forth and wrap things thinly πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from