… | |
… | |
90 | |
90 | |
91 | headers => hashref |
91 | headers => hashref |
92 | The request headers to use. Currently, "http_request" may |
92 | The request headers to use. Currently, "http_request" may |
93 | provide its own "Host:", "Content-Length:", "Connection:" and |
93 | provide its own "Host:", "Content-Length:", "Connection:" and |
94 | "Cookie:" headers and will provide defaults for "User-Agent:" |
94 | "Cookie:" headers and will provide defaults for "User-Agent:" |
95 | and "Referer:". |
95 | and "Referer:" (this can be suppressed by using "undef" for |
|
|
96 | these headers in which case they won't be sent at all). |
96 | |
97 | |
97 | timeout => $seconds |
98 | timeout => $seconds |
98 | The time-out to use for various stages - each connect attempt |
99 | The time-out to use for various stages - each connect attempt |
99 | will reset the timeout, as will read or write activity. Default |
100 | will reset the timeout, as will read or write activity. Default |
100 | timeout is 5 minutes. |
101 | timeout is 5 minutes. |
… | |
… | |
102 | proxy => [$host, $port[, $scheme]] or undef |
103 | proxy => [$host, $port[, $scheme]] or undef |
103 | Use the given http proxy for all requests. If not specified, |
104 | Use the given http proxy for all requests. If not specified, |
104 | then the default proxy (as specified by $ENV{http_proxy}) is |
105 | then the default proxy (as specified by $ENV{http_proxy}) is |
105 | used. |
106 | used. |
106 | |
107 | |
107 | $scheme must be either missing or "http" for HTTP, or "https" |
108 | $scheme must be either missing, "http" for HTTP or "https" for |
108 | for HTTPS. |
109 | HTTPS. |
109 | |
110 | |
110 | body => $string |
111 | body => $string |
111 | The request body, usually empty. Will be-sent as-is (future |
112 | The request body, usually empty. Will be-sent as-is (future |
112 | versions of this module might offer more options). |
113 | versions of this module might offer more options). |
113 | |
114 | |
… | |
… | |
246 | The default value for the "User-Agent" header (the default is |
247 | The default value for the "User-Agent" header (the default is |
247 | "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; |
248 | "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; |
248 | +http://software.schmorp.de/pkg/AnyEvent)"). |
249 | +http://software.schmorp.de/pkg/AnyEvent)"). |
249 | |
250 | |
250 | $AnyEvent::HTTP::MAX_PER_HOST |
251 | $AnyEvent::HTTP::MAX_PER_HOST |
251 | The maximum number of concurrent conenctions to the same host |
252 | The maximum number of concurrent connections to the same host |
252 | (identified by the hostname). If the limit is exceeded, then the |
253 | (identified by the hostname). If the limit is exceeded, then the |
253 | additional requests are queued until previous connections are |
254 | additional requests are queued until previous connections are |
254 | closed. |
255 | closed. |
255 | |
256 | |
256 | The default value for this is 4, and it is highly advisable to not |
257 | The default value for this is 4, and it is highly advisable to not |