HttpHeaders.opIndex

string opIndex(string name) const

Map-like read access.

Returns the first 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, and getAll(name) to retrieve repeated values.

string opIndex(string name) ref

Map-like read/write access.

Ensures the header exists (with one empty value) and returns that value 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.