This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MockURLProtocol.swift | |
// SolutoHome | |
// | |
// Created by Omer Levi Hevroni on 2/23/16. | |
// Copyright © 2016 Soluto. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |