generate a HTTP response from a single ByteBuffer
generate a HTTP response from a single ByteBuffer
the single ByteBuffer
which represents the body.
Note: this method will not modify the passed ByteBuffer
, instead making
read-only views of it when writing to the socket, so the resulting responses
can be reused multiple times.
Generate a 413 'Entity Too Large' response
Generate a 500 'Internal Server Error' with the specified message
Generate a 200 OK HTTP response from a ByteBuffer
Generate a 200 OK HTTP response from a ByteBuffer
Generate a 200 OK HTTP response from a String
Generate a 200 OK HTTP response from a String
Generate a 200 OK HTTP response from an Array[Byte]
Generate a 200 OK HTTP response from an Array[Byte]
generate a streaming HTTP response
generate a streaming HTTP response
each invocation should generate the next body chunk. Each chunk will be written
before requesting another chunk. Termination is signaled by an empty ByteBuffer
as
defined by the return value of ByteBuffer.hasRemaining()
.
generate a HTTP response from a String