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

Network.HTTP.Link.Types

Description

The data type definitions for the HTTP Link header.

Synopsis

Documentation

data LinkParam Source #

The link attribute key.

Instances

Instances details
Eq LinkParam Source # 
Instance details

Defined in Network.HTTP.Link.Types

Show LinkParam Source # 
Instance details

Defined in Network.HTTP.Link.Types

data Link uri Source #

A single link containing some representation of a URL.

Constructors

Link uri [(LinkParam, Text)] 

Instances

class IsURI uri where Source #

Types that can represent URLs.

For example, to parse links containing Text.URI.URI from the modern-uri package, simply define the orphan instance:

   instance IsURI Modern.URI where
       uriFromText = left displayException . mkURI
       uriToText = render

Since: 1.1.0

Instances

Instances details
IsURI Text Source # 
Instance details

Defined in Network.HTTP.Link.Types

IsURI URI Source # 
Instance details

Defined in Network.HTTP.Link.Types

href :: IsURI uri => Link uri -> uri Source #

Extracts the URI from the link.

linkParams :: Link uri -> [(LinkParam, Text)] Source #

Extracts the parameters from the link.