servant-rawm-0.2.0.2: Embed a raw 'Application' in a Servant API

CopyrightDennis Gosnell 2017
LicenseBSD3
MaintainerDennis Gosnell (cdep.illabout@gmail.com)
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Servant.RawM.Internal.Client

Contents

Description

This module only exports a HasClient instance for RawM.

Synopsis

Documentation

Orphan instances

HasClient * (RawM' serverType) Source #

Creates a client route like the following:

>>> :set -XTypeOperators
>>> import Data.Type.Equality ((:~:)(Refl))
>>> Refl :: Client (RawM' a) :~: (Method -> (Req -> Req) -> ClientM (Int, ByteString, MediaType, [Header], Response ByteString))
Refl

This allows modification of the underlying Req to work for any sort of Application.

Check out the example in the source code repository that shows a more in-depth server, client, and documentation.

Associated Types

type Client (RawM' serverType) (api :: RawM' serverType) :: * #

Methods

clientWithRoute :: Proxy (RawM' serverType) api -> Req -> Client (RawM' serverType) api #