Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct UserProfile {}
- func getProfile(token: String) -> Promise<UserProfile>
- func login(username: String, password: String) -> Promise<String>
- login(username: "alfianlosari", password: "123456")
- .then { getProfile(token: $0 ) }
- .then { print("Profile Retrieved: \($0)") }
- .catch { print("Error: \($0)")
- }
Add Comment
Please, Sign In to add comment