-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A parser and writer for the HTTP Link header as specified in RFC 5988 "Web Linking". -- @package http-link-header @version 0.1.0 -- | The data type definitions for the HTTP Link header. module Network.HTTP.Link.Types -- | The link attribute key. data LinkParam Rel :: LinkParam Anchor :: LinkParam Rev :: LinkParam Hreflang :: LinkParam Media :: LinkParam Title :: LinkParam Title' :: LinkParam ContentType :: LinkParam Other :: Text -> LinkParam -- | A single link. data Link Link :: Text -> [(LinkParam, Text)] -> Link -- | Extracts the URI from the link. href :: Link -> Text -- | Extracts the parameters from the link. linkParams :: Link -> [(LinkParam, Text)] instance [safe] Eq LinkParam instance [safe] Show LinkParam instance [safe] Eq Link instance [safe] Show Link module Network.HTTP.Link.Writer writeLink :: Link -> Text writeLinkHeader :: [Link] -> Text -- | 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. module Network.HTTP.Link.Parser -- | The Attoparsec parser for the Link header. linkHeader :: Parser [Link] -- | Parses a Link header, returns an Either, where Left is the Attoparsec -- error string (probably not a useful one). parseLinkHeader' :: Text -> Either String [Link] -- | Parses a Link header, returns a Maybe. parseLinkHeader :: Text -> Maybe [Link] -- | This module exports all the things at the same time. module Network.HTTP.Link