http-link-header-1.2.3: HTTP Link header parser/writer

Safe Haskell | Safe
Language | Haskell2010

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

- linkHeader :: IsURI uri => Parser [Link uri]
- parseLinkHeader' :: IsURI uri => Text -> Either String [Link uri]
- parseLinkHeader :: IsURI uri => Text -> Maybe [Link uri]
- parseLinkHeaderBS' :: IsURI uri => ByteString -> Either String [Link uri]
- parseLinkHeaderBS :: IsURI uri => ByteString -> Maybe [Link uri]

# 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.