--- AnyEvent-HTTP/README 2009/08/05 16:43:47 1.10 +++ AnyEvent-HTTP/README 2009/12/05 15:37:07 1.12 @@ -97,8 +97,10 @@ timeout => $seconds The time-out to use for various stages - each connect attempt - will reset the timeout, as will read or write activity. Default - timeout is 5 minutes. + will reset the timeout, as will read or write activity, i.e. + this is not an overall timeout. + + Default timeout is 5 minutes. proxy => [$host, $port[, $scheme]] or undef Use the given http proxy for all requests. If not specified, @@ -140,6 +142,15 @@ The default for this option is "low", which could be interpreted as "give me the page, no matter what". + on_prepare => $callback->($fh) + In rare cases you need to "tune" the socket before it is used to + connect (for exmaple, to bind it on a given IP address). This + parameter overrides the prepare callback passed to + "AnyEvent::Socket::tcp_connect" and behaves exactly the same way + (e.g. it has to provide a timeout). See the description for the + $prepare_cb argument of "AnyEvent::Socket::tcp_connect" for + details. + on_header => $callback->($headers) When specified, this callback will be called with the header hash as soon as headers have been successfully received from the @@ -238,7 +249,10 @@ GLOBAL FUNCTIONS AND VARIABLES AnyEvent::HTTP::set_proxy "proxy-url" Sets the default proxy server to use. The proxy-url must begin with - a string of the form "http://host:port" (optionally "https:..."). + a string of the form "http://host:port" (optionally "https:..."), + croaks otherwise. + + To clear an already-set proxy, use "undef". $AnyEvent::HTTP::MAX_RECURSE The default value for the "recurse" request parameter (default: 10).