nero-0.1.1: Lens-based HTTP toolkit

Safe HaskellSafe-Inferred
LanguageHaskell2010

Nero.Url

Contents

Synopsis

Documentation

data Url Source

Composite type of a Scheme, Host, Path, Query.

data Scheme Source

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

Instances

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

Instances

class Location a where Source

Traversal' to obtain the Url of types with Location.

Instances

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 HasQuery a where Source

Lens' for types with a Query.

Methods

query :: Lens' a Query Source

class Param a where Source

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

Instances

Param MultiMap 
Param Url 
Param Payload 
Param Request

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.