Net::Async::HTTP::Server::Request - represents a single outstanding request
Net::Async::HTTP::Server::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.
Return the method name from the request header.
Return the path name from the request header.
Return the protocol version from the request header. This will be the full string, such as HTTP/1.1.
HTTP/1.1
Return the body content from the request as a string of bytes.
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 respond_chunk will send another chunk of data. respond_chunk_eof will send the final EOF chunk.
$response
Transfer-Encoding
respond_chunk
respond_chunk_eof
If the $response already contained content, that will be sent as one chunk immediately after the header is sent.
Paul Evans <leonerd@leonerd.org.uk>
To install Net::Async::HTTP::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::HTTP::Server
CPAN shell
perl -MCPAN -e shell install Net::Async::HTTP::Server
For more information on module installation, please visit the detailed CPAN module installation guide.