{-# options_haddock prune #-}
module Polysemy.Http.Effect.Http where
import Polysemy.Http.Data.HttpError (HttpError)
import Polysemy.Http.Data.Request (Request)
import Polysemy.Http.Data.Response (Response)
data Http c :: Effect where
Response :: Request -> (Response c -> m a) -> Http c m (Either HttpError a)
Request :: Request -> Http c m (Either HttpError (Response LByteString))
ConsumeChunk :: Maybe Int -> c -> Http c m (Either HttpError ByteString)
makeSem_ ''Http
response ::
∀ c r a .
Member (Http c) r =>
Request ->
(Response c -> Sem r a) ->
Sem r (Either HttpError a)
request ::
∀ c r .
Member (Http c) r =>
Request ->
Sem r (Either HttpError (Response LByteString))
consumeChunk ::
∀ c r .
Member (Http c) r =>
Maybe Int ->
c ->
Sem r (Either HttpError ByteString)