Creates a new header.
A field/id with value, optionally prefixed by a charset.
ReadonlyoptionsThe parser options associated with this header.
ReadonlyrawThe raw header field bytes.
The byte offset of this header, if known.
ReadonlyfieldThe header field name.
ReadonlyidThe well-known header identifier.
ReadonlyisWhether this header is invalid.
Invoked when the header changes.
The raw header value bytes.
The decoded and unfolded header value.
StaticfromCreates a header from raw field and value bytes.
The parser options.
The header identifier.
The header field name.
The raw header value bytes.
Whether the header is syntactically invalid.
OptionalrawField: Uint8Array<ArrayBufferLike>
The raw field bytes.
The created header.
Gets the decoded header value using the specified charset.
The charset to use for decoding.
The decoded and unfolded header value.
Sets the header value using the specified formatting options and charset.
The formatting options.
The charset to use for encoding.
The header value.
Sets the header value using the specified charset.
The charset to use for encoding.
The header value.
Gets the raw header value bytes for the specified formatting options.
The formatting options.
The raw header value bytes.
Serializes this header.
A string representing this header.
StaticunfoldUnfolds a header value by removing line breaks.
The header value text.
The unfolded header value.
StaticfoldFolds a header value according to the specified formatting options.
The formatting options.
The header field name.
The header value.
The folded header value.
StaticreformatReformats an address header value for the specified formatting options.
The parser options.
The formatting options.
The header field name.
The raw header value bytes.
The reformatted raw value bytes, or the original bytes if parsing fails.
StaticparseParses a header from text or bytes.
The input to parse.
The parser options.
The starting index of the input.
Optionallength: number
The number of bytes to parse.
A Result; { ok: false } with a MimeError on malformed input.
Represents a message header field and value.