nero-0.3.1: Lens-based HTTP toolkit

Safe HaskellSafe
LanguageHaskell2010

Nero.Url

Contents

Synopsis

URL

data Scheme Source

The scheme given in the Url, i.e. http or https.

Constructors

Http 
Https 

type Host = ByteString Source

The host name of a Url.

type Path = Text Source

Path after the host name in a Url.

type Query = MultiMap Source

The query string in the form of a MultiMap.

class HasUrl a where Source

Lens' for types with an Url.

Methods

url :: Lens' a Url Source

class Location a where Source

Traversal' to obtain the Url of types with Location.

class HasHost a where Source

Lens' for types with a Host.

Methods

host :: Lens' a Host Source

class HasPath a where Source

Lens' for types with a Path.

Methods

path :: Lens' a Path Source

class Param a where Source

A Traversal' of the values of a given HTTP parameter.

Instances

Param MultiMap Source 
Param Payload Source 
Param Url Source 
Param Request Source

It traverses the values with the same key both in the query string and the form encoded body of a POST Request.

Testing

dummyUrl :: Url Source

Empty Url useful for testing.