@@ -297,6 +297,31 @@ instance {-# OVERLAPPABLE #-}
297 , requestMethod = reflectMethod (Proxy :: Proxy method)
297 , requestMethod = reflectMethod (Proxy :: Proxy method)
300+instance {-# OVERLAPPING #-}
301+ ( RunStreamingClient m, MimeUnrender ct chunk, ReflectMethod method,
302+ FramingUnrender framing, FromSourceIO chunk a,
304+ ) => HasClient m (Stream method status framing ct (Headers hs a)) where
306+ type Client m (Stream method status framing ct (Headers hs a)) = m (Headers hs a)
308+ hoistClientMonad _ _ f ma = f ma
310+ clientWithRoute _pm Proxy req = withStreamingRequest req' $ \gres -> do
311+ let mimeUnrender' = mimeUnrender (Proxy :: Proxy ct) :: BL.ByteString -> Either String chunk
312+ framingUnrender' = framingUnrender (Proxy :: Proxy framing) mimeUnrender'
313+ val = fromSourceIO $ framingUnrender' $ responseBody gres
316+ , getHeadersHList = buildHeadersTo . toList $ responseHeaders gres
321+ { requestAccept = fromList [contentType (Proxy :: Proxy ct)]
322+ , requestMethod = reflectMethod (Proxy :: Proxy method)
300-- | If you use a 'Header' in one of your endpoints in your API,
325-- | If you use a 'Header' in one of your endpoints in your API,
301-- the corresponding querying function will automatically take
326-- the corresponding querying function will automatically take
302-- an additional argument of the type specified by your 'Header',
327-- an additional argument of the type specified by your 'Header',