Created
February 24, 2016 03:12
-
-
Save keithics/f5379a48d02603707357 to your computer and use it in GitHub Desktop.
Sample code for Swift with username and token
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
let params = ["username":username,"token":token,"param1":param1,"param2":param2] | |
RestClient.request(self,method:.POST,URLString: RestApi.MY_URL,parameters:params, | |
onSuccess:{ data in | |
self.saveCache(data) | |
},onError:{ error in | |
},onFailure:{ | |
print("failed") | |
},onDone:{ | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment