Function Output.addHeader
Add a http header.
You can't set content-length
, status
or transfer-encoding
headers. They are managed by serverino internally.
void addHeader
(
in const(string) key,
in const(string) value
) @safe;
void addHeader
(
in const(string) key,
in const(core .time .Duration) dur
) @safe;
void addHeader
(
in const(string) key,
in const(std .datetime .systime .SysTime) time
) @safe;
// Set content-type to json, default is text/html
output .addHeader("content-type", "application/json");
output .addHeader("expire", 3 .days);