Right now, Controller methods are returning a single response object that's later written to the HTTP response body.
Let's add support for two more advanced response modes:
-
A method returning an async iterator instead of in-memory array instance - see e.g. KeyValueModel.iterateKeys
-
A method returning a readable stream. The stream can be either "regular" text/binary stream, but also a stream in object mode, where the framework is expected to serialize the objects to JSON/XML/etc.