Output.addHeader

Add a http header. You can't set content-length, status or transfer-encoding headers. They are managed by serverino internally.

// Set content-type to json, default is text/html
output.addHeader("content-type", "application/json");
output.addHeader("expire", 3.days);
  1. void addHeader(string key, string value)
  2. void addHeader(string key, Duration dur)
    struct Output
    @safe
    void
    addHeader
    (
    in string key
    ,
    in Duration dur
    )
  3. void addHeader(string key, SysTime time)

Meta