HTTPServerResponseData.writeBody

Writes the entire response body at once.

  1. void writeBody(ubyte[] data, string content_type)
  2. void writeBody(ubyte[] data, int status, string content_type)
    struct HTTPServerResponseData
    protected @safe @safe
    void
    writeBody
    (
    in ubyte[] data
    ,
    int status
    ,
    string content_type = null
    )
  3. void writeBody(InputStream data, string content_type)
  4. void writeBody(string data, string content_type)
  5. void writeBody(string data, int status, string content_type)

Parameters

data ubyte[]

The data to write as the body contents

status int

Optional response status code to set

See Also

HTTPStatusCode

Meta