HeadersParser
Low-level parser for multipart header blocks.
Constructors
Errors
A multipart header parsing failure.
Signature
interface Failure { readonly _tag: "Failure"; readonly headers: Record<string, string | Array<string>>; readonly reason: FailureReason;}FailureReason type
Added in v4.0.0
Source
The reason a multipart header block could not be parsed.
Signature
type FailureReason = | "TooManyHeaders" | "HeaderTooLarge" | "InvalidHeaderName" | "InvalidHeaderValue";Models
Indicates that the parser needs more input.
Signature
interface Continue { readonly _tag: "Continue";}A successfully parsed multipart header block.
Signature
interface Headers { readonly _tag: "Headers"; readonly endPosition: number; readonly headers: Record<string, string | Array<string>>;}ReturnValue type
Added in v4.0.0
Source
The result of parsing a multipart header block.
Signature
type ReturnValue = Continue | Failure | Headers;
Creates an incremental multipart header parser.