HTTP::Server::Response
Inherits IO / Reference / Object
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.
Instance methods
cell_stream
Sourcecell_stream=(value : Forest::Cell::Stream)
Sourcedata_padding_data
Sourcedata_padding_data=(value : Bytes)
Sourcedata_padding_length
Sourcedata_padding_length=(value : UInt8)
Sourceend_stream?(written_size : Int64) : Bool
Sourceheaders_padding_data
Sourceheaders_padding_data=(value : Bytes)
Sourceheaders_padding_length
Sourceheaders_padding_length=(value : UInt8)
Sourcestream_identifier
Sourcestream_identifier=(value : Int32)
Sourceunbuffered_write_chunked_end_stream
Sourceupgrade
Upgrades this response, writing headers and yielding the connection IO (a socket) to the given block.
This is useful to implement protocol upgrades, such as websockets.
write_http2_headers
Sourcewritten=(value : Bool)
Sourcewritten?
Source