Skip to content

Instantly share code, notes, and snippets.

@peerasak-u
Created October 11, 2013 08:47
Show Gist options
  • Select an option

  • Save peerasak-u/6931647 to your computer and use it in GitHub Desktop.

Select an option

Save peerasak-u/6931647 to your computer and use it in GitHub Desktop.
NSDictionary *params = @{@"username": usernameInput,
@"password": passwordOutput,
@"uuid": deviceID,
@"device_name": [[UIDevice currentDevice] name],
@"version": [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]};
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/authentication_revised.php",host]];
request = [ASIFormDataRequest requestWithURL:url];
[request setRequestMethod:@"POST"];
[params enumerateKeysAndObjectsUsingBlock:
^(id key, id value, BOOL *stop) {
[request setPostValue:value forKey:key];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment