module Hreq.Core.API.Streaming where
import Data.ByteString (ByteString)
import Hreq.Core.API.MediaType
import Hreq.Core.API.Response
import Hreq.Core.API.Verb
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 }
instance Show (GivesPooper a) where
show _ = "GivesPooper <IO>"
instance Eq (GivesPooper a) where
_ == _ = False
class HasStreamBody a where
givePopper :: a -> GivesPooper ()