Performs a request for the resource specified by
, which is an HTTP::Request object.
Returns the information received from the server as an HTTP::Response object.
Normally, doing a
is enough. You can also specify a
subroutine to process the data as it comes in, or you can provide a filename
in which to store the entity body of the response. The arguments are:
An HTTP::Request object. The object must contain the method and URL
of the site to be queried. This object must exist before
Name of the file in which to store the response's entity body. When this option is used
, the entity body of the returned response object will be empty.
A reference to a subroutine that will process the data of the response. If you
use the optional third argument,
, the subroutine will be called any time
that number of bytes is received as response data.
The subroutine should expect each chunk of the entity-body data as a scalar in
the first argument, an HTTP::Response object as the second argument, and an LWP::Protocol object as the third argument.
Optional argument specifying the number of bytes of the entity body received
callback is called to process response data.