Open lpil opened 4 months ago
hey I'm also interested in a response body streaming API, did you have a particular design in mind?
Maybe something like this?
pub fn send_stream(req: Request(String)) -> Result(Response(Iterator(BitArray)), Dynamic)
I think it would be message based. Iterators are not suitable for streaming like this.
ah I see thanks, would you be able to share an example snippet? I'm new to Gleam so I'm not sure what that would look like exactly
I don't believe anyone has done any research and design on this yet.
For example, for @hayleigh-dot-dev's chat-bot project