context-http-client-0.1.0.0: Modify HTTP requests/responses using context

Safe HaskellNone
LanguageHaskell2010

Network.HTTP.Client.Context

Contents

Synopsis

Updating manager settings

modifyRequestsWithContext :: Store ctx -> (Maybe ctx -> Request -> IO Request) -> ManagerSettings -> ManagerSettings Source #

Update the provided ManagerSettings to modify all outgoing Request values, utilizing the calling thread's registered context if present.

Note that the modifying function can be called multiple times, so be sure to define your function to first check if the Request needs modification. See managerModifyRequest for details.

Since: 0.1.0.0

modifyResponsesWithContext :: Store ctx -> (Maybe ctx -> Response BodyReader -> IO (Response BodyReader)) -> ManagerSettings -> ManagerSettings Source #

Update the provided ManagerSettings to modify all incoming Response values, utilizing the calling thread's registered context if present.

Since: 0.1.0.0