A full HTTP header field with the name and value separated.
E.g. "Content-Length: 28" parsed into a Header would turn into ("Content-Length", "28")
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulehttp-types-0.12.4Haskell2010
Type and constants for handling HTTP header fields.
At the bottom are also some functions to handle certain header field values.
A full HTTP header field with the name and value separated.
E.g. "Content-Length: 28" parsed into a Header would turn into ("Content-Length", "28")
A case-insensitive name of a header field.
This is the part of the header field before the colon: HeaderName: some value
A list of Headers.
Same type as ResponseHeaders, but useful to differentiate in type signatures.
A list of Headers.
Same type as RequestHeaders, but useful to differentiate in type signatures.
The following header constants are provided for convenience, to prevent accidental spelling errors.
This header has been obsoleted in RFC 9110.
This header has been deprecated in RFC 9111 in favor of "Cache-Control".
This header has been obsoleted in RFC 9110.
Convenience functions and types to handle values from Range headers.
https://www.rfc-editor.org/rfc/rfc9110.html#name-byte-ranges
An individual byte range.
Negative indices are not allowed!
Eq ByteRangeDefined in http-types-0.12.4 · Network.HTTP.Types.HeaderData ByteRangeDefined in http-types-0.12.4 · Network.HTTP.Types.HeaderOrd ByteRangeDefined in http-types-0.12.4 · Network.HTTP.Types.HeaderShow ByteRangeDefined in http-types-0.12.4 · Network.HTTP.Types.HeaderGeneric ByteRangeDefined in http-types-0.12.4 · Network.HTTP.Types.Headertype Rep ByteRange = D1 ('MetaData "ByteRange"
"Network.HTTP.Types.Header"
"http-types-0.12.4-KkMxTblWZY5WJ4M2x8W7s"
'False) (C1 ('MetaCons "ByteRangeFrom"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: (C1 ('MetaCons "ByteRangeFromTo"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer)) :+: C1 ('MetaCons "ByteRangeSuffix"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))))Defined in http-types-0.12.4 · Network.HTTP.Types.HeaderTurns a byte range into a byte string Builder.
Renders a byte range into a ByteString.
renderByteRange (ByteRangeFrom 2048)"2048-"
A list of byte ranges.
Turns a list of byte ranges into a byte string Builder.
Renders a list of byte ranges into a ByteString.
renderByteRanges [ByteRangeFrom 2048, ByteRangeSuffix 20]"bytes=2048-,-20"
Parse the value of a Range header into a ByteRanges.
parseByteRanges "error"NothingparseByteRanges "bytes=0-499"Just [ByteRangeFromTo 0 499]parseByteRanges "bytes=500-999"Just [ByteRangeFromTo 500 999]parseByteRanges "bytes=-500"Just [ByteRangeSuffix 500]parseByteRanges "bytes=9500-"Just [ByteRangeFrom 9500]parseByteRanges "bytes=0-0,-1"Just [ByteRangeFromTo 0 0,ByteRangeSuffix 1]parseByteRanges "bytes=500-600,601-999"Just [ByteRangeFromTo 500 600,ByteRangeFromTo 601 999]parseByteRanges "bytes=500-700,601-999"Just [ByteRangeFromTo 500 700,ByteRangeFromTo 601 999]