class HTTP::Server::Response
- HTTP::Server::Response
- IO
- Reference
- Object
Overview
The response to configure and write to in an HTTP::Server handler.
The response status and headers must be configured before writing
the response body. Once response output is written, changing the status
and headers properties has no effect.
The HTTP::Server::Response is a write-only IO, so all IO methods are available
in it.
A response can be upgraded with the upgrade method. Once invoked, headers
are written and the connection IO (a socket) is yielded to the given block.
This is useful to implement protocol upgrades, such as websockets.