             self.base.downloadProgress { progress in
                 let rxProgress = RxProgress(bytesWritten: progress.completedUnitCount,
                                             totalBytes: progress.totalUnitCount)
-                observer.onNext(rxProgress)
+                observer.on(.next(rxProgress))
                 if rxProgress.bytesWritten >= rxProgress.totalBytes {
-                    observer.onCompleted()
+                    observer.on(.completed)
                 }
             }
             return Disposables.create()

                observer.on(.next(request))
                request.responseWith(completionHandler: { (response) in
                    if let error = response.error {
                        observer.onError(error)
                    } else {
                        observer.on(.completed)
                    }


            request.responseJSON { response in
                if let error = response.result.error {
                    observer.on(.error(error))
                } else {
                    observer.on(.next(response))
                    observer.on(.completed)
                }
            }

