http-grammar- Attoparsec-based parsers for the RFC-2616 HTTP grammar rules.

Safe HaskellSafe




This module provides Attoparsec-based parsers for the HTTP grammar rules as defined by RFC-2616.


Parsable data types.

data UserAgent Source #

The User-Agent header field is defined as a list of tokens, each of which is either a product or a comment. Values of this data type represents one such token.

data Product Source #

A representation of an HTTP User-Agent product.


comment :: Parser ByteString Source #

comment - basic http grammar rule. The result is the parsed comment content, rather than the raw source.

token :: Parser ByteString Source #

token - basic http grammar rule.

The grammar specifies that adjacent LWS should be consumed without affecting the meaning of the token. This parser returns the token stripped of any adjacent lws.

lws :: Parser () Source #

LWS - basic http grammar rule. (L)inear (W)hite(S)pace.

Consumes all linear whitespace.

crlf :: Parser () Source #

crlf - basic http grammar rule.

Consumes one crlf.