Support 'Duplex' streams in the existing 'Body' instance for streams (#187)

This commit is contained in:
Arthur Xavier 2021-11-29 14:09:40 -03:00 committed by GitHub
parent 619c18e8a8
commit c34b341a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ instance bodyBuffer :: Body Buffer where
-- | `Transfer-Encoding` header to indicate chunked data. To write the data, we
-- | simply pipe the newtype-wrapped `Stream` to the response.
instance bodyChunked ::
TypeEquals (Stream r) (Readable ()) =>
TypeEquals (Stream r) (Readable s) =>
Body (Stream r) where
defaultHeaders _ = pure $ header "Transfer-Encoding" "chunked"
write body response = makeAff \done -> do