1POE::Component::Client:U:sHeTrTPC:o:nRterqiubeustte(d3P)POeEr:l:CDoomcpuomneenntta:t:iColnient::HTTP::Request(3)
2
3
4
6 POE::Component::Client::HTTP::Request - an HTTP request class
7
9 # Used internally by POE::Component::Client::HTTP
10
12 POE::Component::Client::HTTP::Request encapsulates the state of
13 requests POE::Component::Client::HTTP requests throughout their life
14 cycles. There turns out to be a lot of state to manage.
15
17 new NAMED_PARAMETERS
18
19 Create a POE::Component::Client::HTTP object to manage a request. The
20 constructor takes several named parameters:
21
22 Request => HTTP_REQUEST
23 A POE::Component::Client::HTTP::Request object encapsulates a plain
24 HTTP::Request. Required.
25
26 Factory => POE_COMPONENT_CLIENT_HTTP_REQUESTFACTORY
27 The request may create additional requests during its lifetime, for
28 example when following redirects. The Factory parameter specifies
29 the POE::Component::Client::HTTP::RequestFactory that may be used to
30 create them. Required.
31
32 Postback => RESPONSE_POSTBACK
33 POE::Component::Client::HTTP creates a postback that will be used to
34 send responses to the requesting session. Required.
35
36 Progress => PROGRESS_POSTBACK
37 Sets the progress notification if the user has requested progress
38 events. Optional.
39
40 Proxy
41 Sets the proxy used for this request, if requested by the user.
42 Optional.
43
45 ID
46
47 Return the request's unique ID.
48
49 return_response
50
51 Sends a response back to the user's session. Called by POE::Compo‐
52 nent::Client::HTTP when a complete response has arrived.
53
54 add_eof
55
56 Called by POE::Component::Client::HTTP to indicate EOF has arrived.
57
58 add_content PARSED_DATA
59
60 Called by POE::Component::Client::HTTP to add content data to an incre‐
61 mentally built response. If PARSED_DATA is an object, it is treated
62 like an HTTP::Headers object and its headers are assimilated into the
63 response being built by the request. Otherwise the PARSED_DATA is
64 appended to the response's content.
65
66 timer TIMER
67
68 Accessor to manipulate the request's timeout timer. Sets the request's
69 timer if TIMER is specified, otherwise merely fetches the one currently
70 associated with the request.
71
72 create_timer TIMEOUT
73
74 Creates and sets a timer for this request. TIMEOUT is the number of
75 seconds this request may live.
76
77 remove_timeout
78
79 Turn off the timer associated with this request, and discard it.
80
81 postback POSTBACK
82
83 Accessor to manipulate the postback associated with this request. Sets
84 the postback if POSTBACK is defined, otherwise merely fetches it.
85
86 does_redirect SOMETHING
87
88 FIXME - Not sure what this accessor does.
89
90 check_redirect
91
92 Check whether the last response is a redirect, the request is permitted
93 to follow redirects, and the maximum number of redirects has not been
94 met. Initiate a redirect if all conditions are favorable.
95
96 send_to_wheel
97
98 Transmit the request to the socket associated with this request.
99
100 wheel
101
102 An accessor to return the wheel associated with this request.
103
104 error ERROR_CODE, ERROR_MESSAGE
105
106 Generate an error response, and post it back to the user's session.
107
108 connect_error CONNECT_FAILURE_MESSAGE
109
110 Generate a connection error response, and post it back to the user's
111 session.
112
113 host
114
115 Return the host this request is attempting to work with.
116
117 port
118
119 Return the port this request is attempting to work with.
120
121 scheme
122
123 Return the scheme for this request.
124
126 POE::Component::Client::HTTP POE
127
129 None are currently known.
130
132 POE::Component::Client::HTTP::Request is
133
134 · Copyright 2004-2005 Martijn van Beerl
135
136 · Copyright 2006 Rocco Caputo
137
138 All rights are reserved. POE::Component::Client::HTTP::Request is free
139 software; you may redistribute it and/or modify it under the same terms
140 as Perl itself.
141
143 Your name could be here.
144
146 Rocco may be contacted by e-mail via <mailto:rcaputo@cpan.org>, and
147 Martijn may be contacted by email via <mailto:martijn@cpan.org>.
148
149 The preferred way to report bugs or requests is through RT though. See
150 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP> or
151 mail <mailto:bug-POE-Component-Client-HTTP@rt.cpan.org>
152
153 For questions, try the POE mailing list (poe@perl.org)
154
155
156
157perl v5.8.8 2006-P1O0E-:1:4Component::Client::HTTP::Request(3)