bilge-0.22.0: Library for composing HTTP requests.
Safe HaskellSafe-Inferred
LanguageGHC2021

Bilge.RPC

Synopsis

Documentation

class HasRequestId m where Source #

Instances

Instances details
Monad m => HasRequestId (ReaderT RequestId m) Source # 
Instance details

Defined in Bilge.RPC

rpc' Source #

Arguments

:: (MonadUnliftIO m, MonadCatch m, MonadHttp m, HasRequestId m) 
=> LText

A label for the remote system in case of RPCExceptions.

-> Request 
-> (Request -> Request) 
-> m (Response (Maybe LByteString)) 

Perform an HTTP request and return the response, thereby forwarding the Request-Id header from the current monadic context. Note: syncIO is wrapped around the IO action performing the request and any exceptions caught are re-thrown in an RPCException.