OAuth:...::Agent(3pm)

πŸ“¦
version 0.11 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– OAuth::Lite2::Agent β€” the lil' base class energy πŸ’–

okay bestie, so this is OAuth::Lite2::Agent, and it lives in the User Contributed Perl Documentation section of the manual (section 3pm, iykyk). It's the base class of preset-agents β€” the blueprint the other agent classes inherit their whole vibe from. No cap.


✨ SYNOPSIS ✨

my $agent = OAuth::Lite2::Client::Agent->new;
my $res = $agent->request( $req );

literally that's it. two lines. we love a low-effort icon πŸ’…


🌸 DESCRIPTION 🌸

Base class of preset-agents. She's the mother of agents, the blueprint, the template. Not much happens here by herself β€” she's the main character that other classes get built on top of 🫢


πŸŽ€ METHODS πŸŽ€

new (%args)

Constructor, bb! And here's the tea: you can set an agent that has the same request interface method as LWP::UserAgent. So like, if you've got your own custom agent and you want this class to use it, that's the slot to drop it into 🧚

If you omit that arg entirely? No stress β€” a simple LWP::UserAgent object gets set by default. She'll always have something to work with, periodt πŸ’–

my $agent = $class->new( agent => YourCustomAgent->new );

request ($req)

Returns an HTTP::Response object. That's the whole deal β€” you hand her a request, she hands you back a response 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

  • OAuth::Lite2::Client::Agent::Dump
  • OAuth::Lite2::Client::Agent::Strict

go check those out too, they're the rest of the agent friend group πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

Lyo Kato, "lyo.kato _at_ gmail.com" β€” the icon, the legend, the one who wrote this whole thing 🌟


This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. So like, free as in do-whatever-Perl-says, bestie πŸ’–


okay that's the whole page, and one last lil' footnote β€” this one's from perl v5.36.0, dated 2023-07-01, and yeah, it's the manpage for OAuth:...::Agent(3pm) πŸ’…βœ¨ mwah, go forth and agent responsibly πŸŽ€

πŸ“¦ where this page comes from