nero-0.2: Lens-based HTTP toolkit

Safe HaskellSafe-Inferred
LanguageHaskell2010

Nero.Param

Description

This module is mainly intended to be used for rare occassions. Nero.Request and Nero.Payload should provide everything you need for HTTP parameters.

Synopsis

Documentation

data MultiMap Source

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

Instances

Eq MultiMap 
Show MultiMap 
Monoid MultiMap

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

Ixed MultiMap 
At MultiMap 
Wrapped MultiMap 
Param MultiMap 
type Index MultiMap = Text 
type IxValue MultiMap = [Text] 
type Unwrapped MultiMap = Map Text [Text] 

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.

encodeMultiMap :: MultiMap -> ByteString Source

Encode a MultiMap with the typical query string format. This is useful to render MultiMaps when testing. The web server adapter for Nero should do this for you in the real application.