I want to send a String (a long String, it's about 600 characters) to webserver (PHP webserver). Can i use NSURLRequest and NSURLConnection to send it to my PHP webserver?
+1
A:
exactly what you are looking for
http://forums.macrumors.com/showthread.php?t=689884
NSString *params = [[NSString alloc] initWithFormat:@"foo=longstringdatagoeshere"];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[params dataUsingEncoding:NSUTF8StringEncoding]];
[[NSURLConnection alloc] initWithRequest:request delegate:self];
remember to implement the delegate methods
Aaron Saunders
2010-08-24 03:45:14
Thanks for your help :)
leduchuy89vn
2010-08-24 03:58:49