AnyEvent-HTTP
view release on metacpan or search on metacpan
the completion callback with an error code of C<598>).
The downside to cancelling the request is that it makes it impossible to
re-use the connection.
This callback is useful when the data is too large to be held in memory
(so the callback writes it to a file) or when only some information should
be extracted, or when the body should be processed incrementally.
It is usually preferred over doing your own body handling via
C<want_body_handle>, but in case of streaming APIs, where HTTP is
only used to create a connection, C<want_body_handle> is the better
alternative, as it allows you to install your own event handler, reducing
resource usage.
=item want_body_handle => $enable
When enabled (default is disabled), the behaviour of AnyEvent::HTTP
changes considerably: after parsing the headers, and instead of
downloading the body (if any), the completion callback will be
called. Instead of the C<$body> argument containing the body data, the
The downside to cancelling the request is that it makes it
impossible to re-use the connection.
This callback is useful when the data is too large to be held in
memory (so the callback writes it to a file) or when only some
information should be extracted, or when the body should be
processed incrementally.
It is usually preferred over doing your own body handling via
"want_body_handle", but in case of streaming APIs, where HTTP is
only used to create a connection, "want_body_handle" is the
better alternative, as it allows you to install your own event
handler, reducing resource usage.
want_body_handle => $enable
When enabled (default is disabled), the behaviour of
AnyEvent::HTTP changes considerably: after parsing the headers,
and instead of downloading the body (if any), the completion
callback will be called. Instead of the $body argument
containing the body data, the callback will receive the
( run in 0.231 second using v1.01-cache-2.11-cpan-a5abf4f5562 )