Contents

banjun/ReactiveSSE

Server Sent Events (SSE) parser operators for ReactiveSwift

Usage

let sse = ReactiveSSE(urlRequest: URLRequest(url: URL(string: endpoint)!))
sse.producer.observe(on: QueueScheduler.main).startWithValues { (v: SSEvent) in
    v.type // String: "message", "update", or whatever
    v.data // String: json payload string, any value string, or whatever
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

ReactiveSSE is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ReactiveSSE'

Author

@banjun

License

ReactiveSSE is available under the MIT license. See the LICENSE file for more info.

Package Metadata

Repository: banjun/ReactiveSSE

Stars: 3

Forks: 2

Open issues: 1

Default branch: master

Primary language: swift

License: MIT

Topics: reactiveswift, server-sent-events

README: README.md