Skip to content

Instantly share code, notes, and snippets.

@alexpersian
Created July 6, 2018 02:49
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 alexpersian/5fa30e12f771c0eff32fac5279c0b49e to your computer and use it in GitHub Desktop.
Save alexpersian/5fa30e12f771c0eff32fac5279c0b49e to your computer and use it in GitHub Desktop.
func requestFirstData() {
firstly {
firstPromise()
}.done { data in
self.process(content: data)
}.catch { error in
print("Error: ", error.localizedDescription)
}
}
func requestSecondData() {
firstly {
secondPromise()
}.done { data in
self.process(content: data)
}.catch { error in
print("Error: ", error.localizedDescription)
}
}
func requestThirdData() {
firstly {
thirdPromise()
}.done { data in
self.process(content: data)
}.catch { error in
print("Error: ", error.localizedDescription)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment