Skip to content

Instantly share code, notes, and snippets.

@keithics
Created February 24, 2016 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithics/f5379a48d02603707357 to your computer and use it in GitHub Desktop.
Save keithics/f5379a48d02603707357 to your computer and use it in GitHub Desktop.
Sample code for Swift with username and token
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