I'd like to pass an object such as this (JavaScript example)
var auth = new Object();
auth.method = "authenticateUser";
auth.data = new Object();
auth.data.email = "user11111@test.com";
auth.data.password = "123123";
to a php script when I'm making a post.
So far, I can only pass individual variables by appending to the url, but I'd like to be able to pass nested objects - such as in javascript examples above
NSString *post =[NSString stringWithFormat:@"username=%@&password=%@",usernameField.text, passwordField.text];
NSString *hostStr = @"{ANY URL}";
hostStr = [hostStr stringByAppendingString:post];
NSData *dataURL = [NSData dataWithContentsOfURL: [ NSURL URLWithString: hostStr ]];
NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding];