HttpHeaders.opIndex

string opIndex(string name) const

Map-like read access.

Returns the header value, or `""` if the header is not present. Use has(name) to check for presence if distinguishing between missing headers and empty values is needed.

string opIndex(string name) ref

Map-like read/write access.

Ensures the header exists and returns it by reference.

This enables convenient usage like headers["x"] ~= ",y".

Warning: Returns a reference to an internal value. Do not store this reference across calls that may remove or modify headers, as it may become invalid.