Skip to content

Support for server-sent events #234

Closed
@fitzgen

Description

@fitzgen

Feature Request

Support for server-sent events in Tide apps.

Detailed Description

Support for working creating server-sent event streams, easily, with Tide.

Some more general server-sent events info:

Context

I would like to use server-sent events. I suppose other folks might want to as well.

Possible Implementation

Ideally, I would be able to have some method on Response or some sort of type that implements IntoResponse that sets the Content-Type: text/event-stream header for me, and takes a Stream<Item = ServerSentEvent> where ServerSentEvent is a struct with an optional event type string and a data string.

Maybe it would automatically send heartbeats too, to keep the connection alive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    designOpen design question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions