iPhone sending POST with NSURLConnection
问题 I\'m having some problems with sending POST data to a PHP script with NSURLConnection. This is my code: const char *bytes = [[NSString stringWithFormat:@\"<?xml version=\\\"1.0\\\"?>\\n<mydata>%@</mydata>\", data] UTF8String]; NSURL *url = [NSURL URLWithString:@\"http://myurl.com/script.php\"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPMethod:@\"POST\"]; [request setHTTPBody:[NSData dataWithBytes:bytes length:strlen(bytes)]]; NSURLResponse