Net::Async::HTTP::Server::Request - represents a single outstanding request
Objects in this class represent a single outstanding request received by a Net::Async::HTTP::Server instance. It allows access to the data received from the web client and allows responding to it.
Returns true if the underlying network connection for this request has already been closed. If this is the case, the application is free to drop the request object and perform no further processing on it.
Return the method name from the request header.
Return the path name from the request header.
Return the query string from the request header.
Return the protocol version from the request header. This will be the full string, such as
Return the value of a request header.
Returns a list of 2-element
ARRAY refs containing all the request headers. Each referenced array contains, in order, the name and the value.
Return the body content from the request as a string of bytes.
Append more data to the response to be written to the client.
$data can either be a plain string, or a
CODE reference to be used in the underlying IO::Async::Stream's
Append more data to the response in the form of an HTTP chunked-transfer chunk. This convenience is a shortcut wrapper for prepending the chunk header.
Marks this response as completed.
Sends the final EOF chunk and marks this response as completed.
Returns the data of the request as an HTTP::Request object.
Respond to the request using the given HTTP::Response object.
Respond to the request using the given HTTP::Response object to send in HTTP/1.1 chunked encoding mode.
The headers in the
$response will be sent (which will be modified to set the
Transfer-Encoding header). Each call to
write_chunk will send another chunk of data.
write_chunk_eof will send the final EOF chunk and mark the request as complete.
$response already contained content, that will be sent as one chunk immediately after the header is sent.
Returns the IO::Async::Stream object representing this connection. Usually this would be used for such things as inspecting the client's connection address on the
read_handle of the stream. It should not be necessary to directly perform IO operations on this stream itself.
Paul Evans <email@example.com>