static/jsvm/interfaces/http.Header.html
A Header represents the key-value pairs in an HTTP header.
The keys should be in canonical form, as returned by [CanonicalHeaderKey].
addclonedelgetsetvalueswritewriteSubset
Add adds the key, value pair to the header. It appends to any existing values associated with key. The key is case insensitive; it is canonicalized by [CanonicalHeaderKey].
Clone returns a copy of h or nil if h is nil.
Del deletes the values associated with key. The key is case insensitive; it is canonicalized by [CanonicalHeaderKey].
Get gets the first value associated with the given key. If there are no values associated with the key, Get returns "". It is case insensitive; [textproto.CanonicalMIMEHeaderKey] is used to canonicalize the provided key. Get assumes that all keys are stored in canonical form. To use non-canonical keys, access the map directly.
Set sets the header entries associated with key to the single element value. It replaces any existing values associated with key. The key is case insensitive; it is canonicalized by [textproto.CanonicalMIMEHeaderKey]. To use non-canonical keys, assign to the map directly.
Values returns all values associated with the given key. It is case insensitive; [textproto.CanonicalMIMEHeaderKey] is used to canonicalize the provided key. To use non-canonical keys, access the map directly. The returned slice is not a copy.
Write writes a header in wire format.
WriteSubset writes a header in wire format. If exclude is not nil, keys where exclude[key] == true are not written. Keys are not canonicalized before checking the exclude map.
OSLightDark
Generated using TypeDoc