HTTPServerResponse.writeRawBody

Writes the whole response body at once, without doing any further encoding.

The caller has to make sure that the appropriate headers are set correctly (i.e. Content-Type and Content-Encoding).

Note that the version taking a RandomAccessStream may perform additional optimizations such as sending a file directly from the disk to the network card using a DMA transfer.

  1. void writeRawBody(RandomAccessStream stream)
  2. void writeRawBody(InputStream stream, size_t num_bytes)
  3. void writeRawBody(RandomAccessStream stream, int status)
  4. void writeRawBody(InputStream stream, int status, size_t num_bytes)
    class HTTPServerResponse
    @safe
    void
    writeRawBody
    (
    InputStream
    )
    (
    InputStream stream
    ,
    int status
    ,
    size_t num_bytes = 0
    )
    if (
    isInputStream!InputStream &&
    !isRandomAccessStream!InputStream
    )

Meta