You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
+1 This sounds like a great idea. Due to the way SSE and c.SendStreamWriter() works, this might require two separate endpoints to work but seems do-able. Do you have a full working example using c.SendStreamWriter() on hand?
A problem we could potentially have with this is that a fiber.Ctx isn't considered safe to use from inside of c.SendStreamWriter() (not sure if this is mentioned in the docs). Reading could potentially be fine, but writing will cause issues from my experience working on the SendStreamWriter feature. If we were to add this method to the fiber.Ctx interface, then it may give a false impression that other Ctx methods would work here too (including ones that write to the response).
If possible, we may want to add this functionality to a different interface to avoid that confusion.
Feature Proposal Description
We have amazing gofiber + htmx + sse. We can send partial template on each update via SSE
Example how it can be reached now:
I propose that we can add method RenderToWriter(w *bufio.Writer, templateName string, data fiber.Map, layoutName string)
Alignment with Express API
HTTP RFC Standards Compliance
API Stability
Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: