HasChor-0.1.0.0: Choreographic programming in Haskell
Safe HaskellSafe-Inferred
LanguageGHC2021

Choreography.Network.Http

Description

This module implments the HTTP message transport backend for the Network monad.

Synopsis

Servant API

type API = "send" :> (Capture "from" LocTm :> (ReqBody '[PlainText] String :> PostNoContent)) Source #

Http configuration

newtype HttpConfig Source #

The HTTP backend configuration specifies how locations are mapped to network hosts and ports.

Constructors

HttpConfig 

Fields

Instances

Instances details
Backend HttpConfig Source # 
Instance details

Defined in Choreography.Network.Http

Methods

runNetwork :: MonadIO m => HttpConfig -> LocTm -> Network m a -> m a Source #

type Port = Int Source #

mkHttpConfig :: [(LocTm, (Host, Port))] -> HttpConfig Source #

Create a HTTP backend configuration from a association list that maps locations to network hosts and ports.

Receiving channels

type RecvChans = HashMap LocTm (Chan String) Source #

HTTP backend