--- AnyEvent-HTTP/README 2009/07/25 01:29:09 1.9 +++ AnyEvent-HTTP/README 2009/08/14 15:21:33 1.11 @@ -92,20 +92,23 @@ The request headers to use. Currently, "http_request" may provide its own "Host:", "Content-Length:", "Connection:" and "Cookie:" headers and will provide defaults for "User-Agent:" - and "Referer:". + and "Referer:" (this can be suppressed by using "undef" for + these headers in which case they won't be sent at all). 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, then the default proxy (as specified by $ENV{http_proxy}) is used. - $scheme must be either missing or "http" for HTTP, or "https" - for HTTPS. + $scheme must be either missing, "http" for HTTP or "https" for + HTTPS. body => $string The request body, usually empty. Will be-sent as-is (future @@ -139,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 @@ -248,7 +260,7 @@ +http://software.schmorp.de/pkg/AnyEvent)"). $AnyEvent::HTTP::MAX_PER_HOST - The maximum number of concurrent conenctions to the same host + The maximum number of concurrent connections to the same host (identified by the hostname). If the limit is exceeded, then the additional requests are queued until previous connections are closed.