 
             request.responseJSON { response in
                 if let error = response.result.error {
-                    observer.onError(error)
+                    observer.on(.error(error))
                 } else {
-                    observer.onNext(response)
-                    observer.onCompleted()
+                    observer.on(.next(response))
+                    observer.on(.completed)
                 }
             }
 

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

                    case .success(let result):
                        if let _ = packedResponse.response {
                            observer.on(.next(result))
                            observer.on(.completed)
                        }
                        else {
                            observer.on(.error(RxAlamofireUnknownError))
                        }
                    case .failure(let error):
                        observer.on(.error(error as Error))
                    }
