… | |
… | |
95 | and "Referer:" (this can be suppressed by using "undef" for |
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 | these headers in which case they won't be sent at all). |
97 | |
97 | |
98 | timeout => $seconds |
98 | timeout => $seconds |
99 | The time-out to use for various stages - each connect attempt |
99 | The time-out to use for various stages - each connect attempt |
100 | will reset the timeout, as will read or write activity. Default |
100 | will reset the timeout, as will read or write activity, i.e. |
|
|
101 | this is not an overall timeout. |
|
|
102 | |
101 | timeout is 5 minutes. |
103 | Default timeout is 5 minutes. |
102 | |
104 | |
103 | proxy => [$host, $port[, $scheme]] or undef |
105 | proxy => [$host, $port[, $scheme]] or undef |
104 | Use the given http proxy for all requests. If not specified, |
106 | Use the given http proxy for all requests. If not specified, |
105 | then the default proxy (as specified by $ENV{http_proxy}) is |
107 | then the default proxy (as specified by $ENV{http_proxy}) is |
106 | used. |
108 | used. |
… | |
… | |
137 | predefined low-security (no verification, highest compatibility) |
139 | predefined low-security (no verification, highest compatibility) |
138 | and high-security (CA and common-name verification) TLS context. |
140 | and high-security (CA and common-name verification) TLS context. |
139 | |
141 | |
140 | The default for this option is "low", which could be interpreted |
142 | The default for this option is "low", which could be interpreted |
141 | as "give me the page, no matter what". |
143 | as "give me the page, no matter what". |
|
|
144 | |
|
|
145 | on_prepare => $callback->($fh) |
|
|
146 | In rare cases you need to "tune" the socket before it is used to |
|
|
147 | connect (for exmaple, to bind it on a given IP address). This |
|
|
148 | parameter overrides the prepare callback passed to |
|
|
149 | "AnyEvent::Socket::tcp_connect" and behaves exactly the same way |
|
|
150 | (e.g. it has to provide a timeout). See the description for the |
|
|
151 | $prepare_cb argument of "AnyEvent::Socket::tcp_connect" for |
|
|
152 | details. |
142 | |
153 | |
143 | on_header => $callback->($headers) |
154 | on_header => $callback->($headers) |
144 | When specified, this callback will be called with the header |
155 | When specified, this callback will be called with the header |
145 | hash as soon as headers have been successfully received from the |
156 | hash as soon as headers have been successfully received from the |
146 | remote server (not on locally-generated errors). |
157 | remote server (not on locally-generated errors). |