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
//
// MockURLProtocol.swift
// SolutoHome
//
// Created by Omer Levi Hevroni on 2/23/16.
// Copyright © 2016 Soluto. All rights reserved.
//
import Foundation
@chuganzy
chuganzy / APIKit+Rx.swift
Last active April 24, 2017 10:05
RxSwift x APIKit
import Foundation
import APIKit
import RxSwift
extension Session {
func rx_sendRequest<T: RequestType>(request: T) -> Observable<T.Response> {
return Observable.create { observer in
let task = self.sendRequest(request) { result in
switch result {
case .Success(let res):