nero-0.3: Lens-based HTTP toolkit

Safe HaskellSafe-Inferred
LanguageHaskell2010

Nero.Payload

Contents

Synopsis

Payload

data Payload Source

Contains the Body and any metadata associated with it.

data Encoding Source

Indicates a Text encoding.

Instances

class HasPayload a where Source

A Lens' for types with a Payload.

Instances

Body

type Body = ByteString Source

It's the main data associated with the Payload of Request or a Response.

class HasBody a where Source

Get the Body for types with one.

Methods

body :: a -> Body Source

Form

type Form = MultiMap Source

A MultiMap in the context of a form.

_Form :: Prism' Payload Form Source

A Prism' to obtain a Form from a Payload and make Payload from a Form.

class Formed a where Source

A Traversal' to access a potential Form.

Testing

dummyPayloadForm :: Payload Source

A Payload with an empty Form useful for testing.