| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.FieldValue
Description
Lexing for HTTP request field values (RFC 9110, section 5): repeated fields, comma lists, and
; parameters. Negotiation and conditional requests read their headers through it.
Synopsis
- fieldValues :: Eq name => name -> [(name, value)] -> [value]
- listMembers :: ByteString -> [ByteString]
- memberParameters :: ByteString -> (ByteString, [(ByteString, ByteString)])
- trimWhitespace :: ByteString -> ByteString
- lowerAscii :: ByteString -> ByteString
Documentation
fieldValues :: Eq name => name -> [(name, value)] -> [value] Source #
Every value of a field, in request order. A field may legally repeat.
listMembers :: ByteString -> [ByteString] Source #
The members of one comma-separated value, trimmed, with empty members dropped.
memberParameters :: ByteString -> (ByteString, [(ByteString, ByteString)]) Source #
Split a list member into its token and parameters, names lowered. A parameter with no = has an empty value.
trimWhitespace :: ByteString -> ByteString Source #
Drop the optional whitespace (spaces and tabs) around a value.
lowerAscii :: ByteString -> ByteString Source #
Lower ASCII letters, for the tokens the grammar compares case-insensitively.