Created
October 13, 2016 10:12
-
-
Save ahikmatf/1d3b8a9d26d0bb8d9d72d2747a14d226 to your computer and use it in GitHub Desktop.
This file contains 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
// http://stackoverflow.com/q/32371792/5552518 | |
func authenticateUser(completionHandler: (responseObject: String?, error: NSError?) -> ()) { | |
makeAuthenticateUserCall(completionHandler) | |
} | |
func makeAuthenticateUserCall(completionHandler: (responseObject: String?, error: NSError?) -> ()) { | |
Alamofire.request(.GET, loginUrlString) | |
.authenticate(user: "a", password: "b") | |
.responseString { request, response, responseString, responseError in | |
completionHandler(responseObject: responseString as String!, error: responseError) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment