Skip to content
/ sseread Public

A tidy library seamlessly reads Server-Sent Events (SSE) from the response body of Go's standard HTTP package.

License

Notifications You must be signed in to change notification settings

mojocn/sseread

Repository files navigation

Server Sent Events Reader

GoDoc Go Report Card codecov Go version Follow mojocn

This is a straightforward library illustrating the method to read Server Sent Events (SSE) stream from the Response.Body in Golang.

Usage

download the library using go get -u github.com/mojocn/sseread@latest

simple examples of how to use the library.

  1. read SSE by callback
  2. read SSE by channel
  3. cloudflare AI text generation example

Testing

# git clone https://github.com/mojocn/sseread.git && cd sseread
go test -v

About

A tidy library seamlessly reads Server-Sent Events (SSE) from the response body of Go's standard HTTP package.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages