httpp/sse

Types

pub type SSEEvent {
  Event(event_type: option.Option(String), data: String)
  Closed
}

Constructors

pub type SSEManagerMessage {
  Shutdown
}

Constructors

  • Shutdown

Values

pub fn event_source(
  req: request.Request(bytes_tree.BytesTree),
  subject: process.Subject(SSEEvent),
) -> Result(process.Subject(SSEManagerMessage), actor.StartError)

Send a request to a server-sent events endpoint, and receive events back on a subject you provide

Search Document