Skip to content

Instantly share code, notes, and snippets.

View sohayb's full-sized avatar

Sohayb Hassoun sohayb

  • Rakuten Kobo Inc.
  • Ottawa, Canada
View GitHub Profile
@sohayb
sohayb / APIKit+Rx.swift
Last active February 18, 2017 06:54 — forked from chuganzy/APIKit+Rx.swift
RxSwift x APIKit (RxSwift 3.0 and Swift 3.0)
import Foundation
import APIKit
import RxSwift
extension Session {
func rx_sendRequest<T: Request>(request: T) -> Observable<T.Response> {
return Observable.create { observer in
let task = self.send(request) { result in
switch result {
case .success(let res):