Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Http c :: Effect where
- response :: forall c r a. Member (Http c) r => Request -> (Response c -> Sem r a) -> Sem r (Either HttpError a)
- request :: forall c r. Member (Http c) r => Request -> Sem r (Either HttpError (Response LByteString))
- consumeChunk :: forall c r. Member (Http c) r => Maybe Int -> c -> Sem r (Either HttpError ByteString)
Documentation
data Http c :: Effect where Source #
The main effect for HTTP requests.
The parameter c
determines the representation of raw chunks.
response :: forall c r a. Member (Http c) r => Request -> (Response c -> Sem r a) -> Sem r (Either HttpError a) Source #
Bracket a higher-order action with a Response
that has been opened while its body
hasn't been fetched.