nero-0.3.1: Lens-based HTTP toolkit

Safe HaskellSafe-Inferred
LanguageHaskell2010

Nero.Param

Contents

Description

This module is mainly intended for internal use. Nero.Request and Nero.Payload should provide everything you need for dealing with HTTP parameters.

Synopsis

HTTP Parameters

class Param a where Source

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

Instances

Param MultiMap 
Param Payload 
Param Url 
Param Request

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

MultiMap

data MultiMap Source

A Map with multiple values. Also known as a MultiDict in other web frameworks.

Instances

Eq MultiMap 
Show MultiMap 
Monoid MultiMap

The default monoid implementation of Data.Map is left biased, this implementation mappends the values.

Ixed MultiMap 
At MultiMap 
Wrapped MultiMap 
Renderable MultiMap

Encode a MultiMap with the typical query string format.

Param MultiMap 
type Index MultiMap = Text 
type IxValue MultiMap = [Text] 
type Unwrapped MultiMap = Map Text [Text] 

fromList :: [(Text, [Text])] -> MultiMap Source

Like fromList from Data.Map but mappending the values.

null :: MultiMap -> Bool Source

Is the map empty?