jdisho / TinyNetworking

🌩 Simple HTTP network abstraction layer written in Swift
MIT License
146 stars 14 forks source link

ReactiveSwift extension #7

Open jdisho opened 5 years ago

jdisho commented 5 years ago
tinyNetworking.reactive.request(resource: .photo(id: 123)).start { event in
    switch event {
    case let .value(response):
        // Do something with the response.
    case let .failed(error):
        // Do something with the error.
    default:
        break
    }
}