swift-eventsource
swift-eventsource copied to clipboard
Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
Hello, Thank you first for this amazing project. I'm desperately looking for a SSE library in Swift. I have difficulties understanding how to utilise this library in Swift. There is...
I used this package to access the OpenAI API. However, when the response has a status code outside of the range 200-300, an error occurs. The `UnsuccessfulResponseError` object only includes...
`// Tells the delegate that the task finished transferring data. public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { utf8LineParser.closeAndReset() let currentRetry = eventParser.reset() guard readyState != .shutdown...
> 这是开启SSE的接口返回的业务Code,能支持回调回来这些信息吗,目前这样的情况下会执行Close,但是不会有任何信息返回来,期望使用这些信息去处理一些业务 
Great project but there is a weakness, how do we pin a SSL certificate? Otherwise anyone could just use Proxyman and do a man-in-the-middle attack to see what the app...
## 🧩 问题描述 当服务端返回业务错误(如未登录,code=40100),响应为 HTTP 200,但返回内容是 JSON 错误体(非 SSE 格式)。当前情况下: - `onMessage` 不触发 - `onError` 也不触发 - 仅 `onClosed` 被回调,但拿不到任何 response body 或状态码 这导致我们在客户端**无法判断为何连接被关闭**,也无法给用户弹出提示(比如"未登录,请重新登录")。 --- ## 🔁 重现步骤 1. 使用...