Standard Library
struct Header
One HTTP header line: a name and its value.
since 0.1.0-alpha.1linuxwindowswasm
Overview
Header is a plain data value. A HeaderMap holds an ordered list of them, so repeated names (such as several Set-Cookie lines) are all kept.
Examples
Header h;
h.name = "Content-Type";
h.value = "text/plain";
console.writeln("${h.name}: ${h.value}");
Content-Type: text/plain
Fields
name
string nameThe header name, spelled as it was written.
value
string valueThe header value, without the name or the line ending.
See also
- HeaderMap — An ordered collection of HTTP headers whose names are matched without regard to letter case.