Sending POST data from iphone over SSL HTTPS

I finally got a way to send data over a secure connection from the iPhone: NSString *post =[[NSString alloc] initWithFormat:@”userName=%@&password=%@”,userName.text,password.text]; NSURL *url=[NSURL URLWithString:@”https://localhost:443/SSLLogin/Login.php”]; NSLog(post); NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@”%d”, [postData length]]; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:url]; [request setHTTPMethod:@”POST”]; [request setValue:postLength forHTTPHeaderField:@”Content-Length”]; [request setValue:@”application/x-www-form-urlencoded” forHTTPHeaderField:@”Content-Type”]; [request … Read more