Class HttpServerResponse

  • All Implemented Interfaces:
    StreamBase, WriteStream<Buffer>

    public class HttpServerResponse
    extends Object
    implements WriteStream<Buffer>
    Represents a server-side HTTP response.

    An instance of this is created and associated to every instance of HttpServerRequest that.

    It allows the developer to control the HTTP response that is sent back to the client for a particular HTTP request.

    It contains methods that allow HTTP headers and trailers to be set, and for a body to be written out to the response.

    It also allows files to be streamed by the kernel directly from disk to the outgoing HTTP connection, bypassing user space altogether (where supported by the underlying operating system). This is a very efficient way of serving files from the server since buffers do not have to be read one by one from the file and written to the outgoing socket.

    It implements WriteStream so it can be used with Pipe to pipe data with flow control.

    NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.