Last active
April 26, 2018 07:43
-
-
Save harshvishu/7d6269f519cd79883dfbf8827ad65727 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1 | |
Alamofire.request(Router.readUser("mattt")).responseObject{ (response: DataResponse<User>) in | |
// Process userResponse, of type DataResponse<User>: | |
if let user = response.value { | |
print("User: { username: \(user.username), name: \(user.name) }") | |
} | |
} | |
// 2 | |
Alamofire.request(Router.readUser("mattt")).responseDecodable{ (response: DataResponse<User>) in | |
// Process userResponse, of type DataResponse<User>: | |
if let user = response.value { | |
print("User: { username: \(user.username), name: \(user.name) }") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment