Skip to content

Instantly share code, notes, and snippets.

@yonivav
Last active February 21, 2019 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonivav/1f3de5dba00ba045063c5a159c97f394 to your computer and use it in GitHub Desktop.
Save yonivav/1f3de5dba00ba045063c5a159c97f394 to your computer and use it in GitHub Desktop.
service
.flatMap { [weak self] text -> Observable<Void> in
guard let self = self else { return .empty() }
.
.
.
return self.network
.request(url: url)
.do(onNext: { response in
self.status.value = .success(response)
}, onError: { _ in
self.fetchStatus()
.subscribe()
.disposed(by: self.bag)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment