HTTP::...:Polite(3pm)

πŸ“¦
version 0.33 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

HTTP::Async::Polite β€” politely process multiple HTTP requests 🫢

(yes bestie, this is the manual page for the HTTP::...:Polite(3pm) situation you're looking at rn)


✨ SYNOPSIS ✨

okay so here's the thing:

See HTTP::Async - the usage is unchanged.

that's it. that's the whole synopsis. no cap.


🌸 DESCRIPTION 🌸

So HTTP::Async is that girl β€” she lets you have like, SO many requests going on at once. iconic behavior. but it's also rude πŸ’€ because if you're fetching several pages from the same domain all at the same time, you're basically that person who texts 47 times in a row with no reply.

This module? It adds limits to how many simultaneous requests can go out to a given domain, and it adds an interval between the requests. so you're still fast, you're just not feral about it. the vibe check passes. ✨

In every other way, it is literally identical in use to the original HTTP::Async. lowkey the same, highkey the same. periodt. πŸ’…


πŸŽ€ NEW METHODS πŸŽ€

🌈 send_interval

Getter and setter for the "send_interval" β€” that's the time in seconds to leave between each request for a given domain.

By default it's set to 5 seconds. so, one request every five seconds per domain. she's patient, she's classy, she's not spam-clicking. πŸ’–


πŸ¦‹ OVERLOADED METHODS πŸ¦‹

these methods are overloaded, but otherwise they work exactly like the original methods did. this section is just here to tell you what's different, bestie. 🫢

🌟 new

Sets the send_interval value to the default of 5 seconds.

🌟 add_with_opts

Adds the request to the correct queue depending on the domain. so every domain gets its own lil queue and everybody waits their turn. organized queen behavior. πŸ‘‘

🌟 to_send_count

Returns the number of requests waiting to be sent.

Plot twist: this is the number in the actual queue plus the number in each domain-specific queue. so it's the total, not just the main one. iykyk. ✨


πŸ’œ SEE ALSO πŸ’œ

  • HTTP::Async β€” the module that this one is based on. 🫢

πŸ“ AUTHOR πŸ“

Edmund von der Burg "<evdb@ecclestoad.co.uk>".

<http://www.ecclestoad.co.uk/>


Copyright (c) 2006, Edmund von der Burg "<evdb@ecclestoad.co.uk>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ’€ DISCLAIMER OF WARRANTY πŸ’€

okay bestie this part is in all caps so you KNOW it's serious. read it, fr fr β€” it's the legal bit and it's staying exactly how it is:

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

and that's the whole page, bestie!! πŸŒˆπŸ’–βœ¨ this lil icon was brought to you by perl v5.36.0, dated 2022-10-15 β€” go be polite to some servers, mwah πŸŽ€πŸ«ΆπŸ’…

πŸ“¦ where this page comes from