POE::C...Request(3pm)

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

πŸ’– POE::Component::Client::HTTP::Request πŸ’–

okay so bestie, welcome to the manual page for POE::Component::Client::HTTP::Request β€” it's a little Perl module, it's part of the User Contributed Perl Documentation crew, and it's currently serving version 0.949. She's an HTTP request class. She's iconic. Let's get into it πŸŽ€


✨ NAME ✨

POE::Component::Client::HTTP::Request β€” an HTTP request class. that's the whole name. short. sweet. slay.


🌸 VERSION 🌸

version 0.949


πŸ¦‹ SYNOPSIS πŸ¦‹

# Used internally by POE::Component::Client::HTTP

that's it. that's the synopsis. she's used internally, bestie β€” you're not really supposed to be driving her yourself. iykyk πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so POE::Component::Client::HTTP::Request encapsulates the state of requests that POE::Component::Client::HTTP makes, like, throughout their entire life cycles. birth to death. main character arc. ✨

and listen β€” there turns out to be a lot of state to manage. like, a lot a lot. that's why this class exists, fr fr.


πŸŽ€ CONSTRUCTOR πŸŽ€

new NAMED_PARAMETERS

Create a POE::Component::Client::HTTP object to manage a request. The constructor takes several named parameters:

  • Request => HTTP_REQUEST β€” a POE::Component::Client::HTTP::Request object encapsulates a plain HTTP::Request. Required. no skips, bestie.
  • Factory => POE_COMPONENT_CLIENT_HTTP_REQUESTFACTORY β€” the request may create additional requests during its lifetime, like when it's following redirects. The Factory parameter specifies the POE::Component::Client::HTTP::RequestFactory that may be used to create them. Required.
  • Postback => RESPONSE_POSTBACK β€” POE::Component::Client::HTTP creates a postback that will be used to send responses to the requesting session. Required.
  • Progress => PROGRESS_POSTBACK β€” sets the progress notification if the user has requested progress events. Optional 🫢
  • Proxy β€” sets the proxy used for this request, if requested by the user. Optional 🌈

πŸ’… METHODS πŸ’…

ID

Return the request's unique ID. her little name tag. her social security number. πŸ’–

return_response

Sends a response back to the user's session. Called by POE::Component::Client::HTTP when a complete response has arrived. she's done, she's served, she ate. πŸ”₯

add_eof

Called by POE::Component::Client::HTTP to indicate EOF has arrived. the end. the finale. 🎬

add_content PARSED_DATA

Called by POE::Component::Client::HTTP to add content data to an incrementally built response. So if PARSED_DATA is an object, it gets treated like an HTTP::Headers object and its headers are assimilated into the response being built by the request. Otherwise, PARSED_DATA just gets appended to the response's content. πŸ“

timer TIMER

Accessor to manipulate the request's timeout timer. Sets the request's timer if TIMER is specified β€” otherwise it just fetches the one currently associated with the request. lowkey dual purpose, highkey useful.

create_timer TIMEOUT

Creates and sets a timer for this request. TIMEOUT is the number of seconds this request may live. give her a lifespan, bestie ⏳

remove_timeout

Turn off the timer associated with this request, and discard it. bye bye timer πŸ‘‹

postback POSTBACK

Accessor to manipulate the postback associated with this request. Sets the postback if POSTBACK is defined β€” otherwise it just fetches it. same energy as timer, no cap.

does_redirect SOMETHING

FIXME β€” Not sure what this accessor does.

literally the original says that. even the source code said "idk bestie" 😭 iconic honestly.

check_redirect

Check whether the last response is a redirect, whether the request is permitted to follow redirects, and whether the maximum number of redirects has not been met. Initiate a redirect if all conditions are favorable. three vibe checks, then we move. ✨

close_connection

Each active request object contains an internal connection. This method closes it. shutting the door gently πŸšͺ

send_to_wheel

Transmit the request to the socket associated with this request. send her off to the wheel, girlboss πŸ›ž

wheel

An accessor to return the wheel associated with this request. not a hamster wheel. a POE wheel. still iconic.

error ERROR_CODE, ERROR_MESSAGE

Generate an error response, and post it back to the user's session. πŸ’€

connect_error CONNECT_FAILURE_MESSAGE

Generate a connection error response, and post it back to the user's session. also πŸ’€

host

Return the host this request is attempting to work with. 🏠

port

Return the port this request is attempting to work with. βš“

scheme

Return the scheme for this request. like http or https or whatever she's wearing today πŸ’…


πŸ‘€ SEE ALSO πŸ‘€

  • POE::Component::Client::HTTP
  • POE

πŸ› BUGS πŸ›

None are currently known.

(not a single one. spotless. glowing. skin clear. ✨)


πŸ‘‘ AUTHOR & COPYRIGHTS πŸ‘‘

POE::Component::Client::HTTP::Request is:

  • Copyright 2004-2005 Martijn van Beers
  • Copyright 2006 Rocco Caputo

All rights are reserved. POE::Component::Client::HTTP::Request is free software; you may redistribute it and/or modify it under the same terms as Perl itself. 🫢


🌈 CONTRIBUTORS 🌈

Your name could be here.

(no like literally. the door is open. come thru bestie πŸ’œ)


πŸ“¬ CONTACT πŸ“¬

Rocco may be contacted by e-mail via <mailto:rcaputo@cpan.org>, and Martijn may be contacted by email via <mailto:martijn@cpan.org>.

The preferred way to report bugs or requests is through RT though. See <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP> or mail <mailto:bug-POE-Component-Client-HTTP@rt.cpan.org>

For questions, try the POE mailing list (poe@perl.org) πŸ“§


aaaand that's the whole page, bestie!! this one's from the User Contributed Perl Documentation collection, sitting pretty at version 0.949, and this particular rendering was generated by perl v5.36.0 on 2022-11-19. go forth and manage your request state responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from