eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
747 stars 131 forks source link

Provide decorator for stream consumer through pipe #276

Closed tzkmx closed 8 months ago

tzkmx commented 11 months ago

However I strongly feel that original API should be built on top of stream not the event

Originally posted by @amitguptagwl in https://github.com/eugef/node-mocks-http/issues/166#issuecomment-377493744

Extending the Stream prototype has been tried but created issues that were reverted at the immediate posterior release.

There are several issues raised around support for Streams, and probably without breaking the current API, we can provide a decorator for request.pipe() that would make easier to integrate with handlers that expect a ReadableStream rather than json or urlencoded body.

eugef commented 11 months ago

I think this is related to #277

github-actions[bot] commented 9 months ago

Stale issue message