Headers.opIndexAssign

Assigns, and overrides if it already exists, a header value. The key is case-insensitive.

struct Headers
pure @safe
string
opIndexAssign
(
string value
,
string key
)

Examples

headers["Connection"] = "keep-alive";
headers["connection"] = "close";
assert(headers["Connection"] == "close");

Meta