Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides classes that one has to implement in order to use a streaming library such as Conduit for streaming.
Synopsis
- type StreamVerb method = Verb method '[ResStream OctetStream ()]
- type StreamGet = StreamVerb GET
- type StreamPost = StreamVerb POST
- type StreamPut = StreamVerb PUT
- type Pooper = IO ByteString
- type NeedsPooper a = Pooper -> IO a
- newtype GivesPooper a = GivesPooper {
- runGivesPooper :: NeedsPooper a -> IO a
- class HasStreamBody a where
- givePopper :: a -> GivesPooper ()
Client Streaming
type StreamVerb method = Verb method '[ResStream OctetStream ()] Source #
A StreamVerb endpoint receives a stream of encoded values with the OctetStream content type.
Stream synonyms
type StreamGet = StreamVerb GET Source #
type StreamPost = StreamVerb POST Source #
type StreamPut = StreamVerb PUT Source #
Request Body streaming
type Pooper = IO ByteString Source #
A function which generates successive chunks of a request body, provider a single empty bytestring when no more data is available.
type NeedsPooper a = Pooper -> IO a Source #
A function which must be provided with a Popper.
newtype GivesPooper a Source #
A datatype containing a function which will provide a Pooper
to a NeedsPooper
. .
GivesPooper | |
|
Instances
Eq (GivesPooper a) Source # | |
Defined in Hreq.Core.API.Streaming (==) :: GivesPooper a -> GivesPooper a -> Bool # (/=) :: GivesPooper a -> GivesPooper a -> Bool # | |
Show (GivesPooper a) Source # | |
Defined in Hreq.Core.API.Streaming showsPrec :: Int -> GivesPooper a -> ShowS # show :: GivesPooper a -> String # showList :: [GivesPooper a] -> ShowS # |
class HasStreamBody a where Source #
givePopper :: a -> GivesPooper () Source #