-- 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". -- -- https://github.com/myfreeweb/http-link-header @package http-link-header @version 1.0.2 -- | 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 :: URI -> [(LinkParam, Text)] -> Link -- | Extracts the URI from the link. href :: Link -> URI -- | Extracts the parameters from the link. linkParams :: Link -> [(LinkParam, Text)] lnk :: String -> [(LinkParam, Text)] -> Maybe Link instance GHC.Show.Show Network.HTTP.Link.Types.Link instance GHC.Classes.Eq Network.HTTP.Link.Types.Link instance GHC.Show.Show Network.HTTP.Link.Types.LinkParam instance GHC.Classes.Eq Network.HTTP.Link.Types.LinkParam 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] -- | Parses a Link header, returns an Either, where Left is the Attoparsec -- error string (probably not a useful one). parseLinkHeaderBS' :: ByteString -> Either String [Link] -- | Parses a Link header, returns a Maybe. parseLinkHeaderBS :: ByteString -> Maybe [Link] -- | This module exports all the things at the same time. module Network.HTTP.Link instance Data.ByteString.Conversion.To.ToByteString [Network.HTTP.Link.Types.Link] instance Data.ByteString.Conversion.To.ToByteString Network.HTTP.Link.Types.Link