Skip to content

Instantly share code, notes, and snippets.

View counter2015's full-sized avatar
🔦
wandering

counter2015 counter2015

🔦
wandering
View GitHub Profile
@counter2015
counter2015 / SseClient.scala
Created November 15, 2024 03:29 — forked from izeigerman/SseClient.scala
Complete SSE client Implementation for Scala using http4s.
import cats.effect.{IO, Timer}
import fs2.{Pull, Stream}
import org.http4s._
import org.http4s.ServerSentEvent.EventId
import org.http4s.client.Client
import org.http4s.headers.{`Cache-Control`, Accept}
import scala.concurrent.duration._
import SseClient._
final class SseClient private (