http-link-header-1.2.1: A parser and writer for the HTTP Link header per RFC 5988
Safe HaskellSafe
LanguageHaskell2010

Network.HTTP.Link.Parser

Description

The parser for the HTTP Link header as defined in RFC 5988. More liberal than the RFC though: does not validate URLs and other deep stuff, accepts whitespace in weird places.

Synopsis

Documentation

linkHeader :: IsURI uri => Parser [Link uri] Source #

The Attoparsec parser for the Link header.

parseLinkHeader' :: IsURI uri => Text -> Either String [Link uri] Source #

Parses a Link header, returns an Either, where Left is the Attoparsec error string (probably not a useful one).

parseLinkHeader :: IsURI uri => Text -> Maybe [Link uri] Source #

Parses a Link header, returns a Maybe.

parseLinkHeaderBS' :: IsURI uri => ByteString -> Either String [Link uri] Source #

Parses a Link header, returns an Either, where Left is the Attoparsec error string (probably not a useful one).

parseLinkHeaderBS :: IsURI uri => ByteString -> Maybe [Link uri] Source #

Parses a Link header, returns a Maybe.