Created
September 14, 2016 13:21
-
-
Save sandeeplearner/57489e3eb83f51cb5d545db67fd0063b 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
import Foundation | |
import Alamofire | |
class FriendsListController { | |
func fetchFriendsList(forUser user : User, completionBlock block : (NSError?) -> ()) { | |
Alamofire.request(.POST, (NSURL(string: "http://idontknowurl.com/getFriendsList"))!, parameters: ["userId" : user.id,"friendsLevel" : "Gmail"], encoding: .URL, headers: ["username" : user.username, "password" : user.password]).response { | |
response in | |
//process response here | |
//configure user | |
//if no error | |
block(nil) | |
//else configure the error | |
//completionBlock(error) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment