Ok, so I have code that posts to my php site, but I want a way to make sure the data gets there. Is there way for the submision to hang intill it timesout or the server responds saying submission accepted?
Here is the code I have so far:
//Create String
NSString *var1 =@"waitTime=";
NSString *var2 =@"&cover=";
NSString *wait = [var1 stringByAppendingString:waitTime.text];
NSString *co = [var2 stringByAppendingString:cover.text];
NSMutableURLRequest *request =
[[NSMutableURLRequest alloc] initWithURL:
[NSURL URLWithString:@"http://mysite.net/index.php"]];
[request setHTTPMethod:@"POST"];
NSString *postString = [wait stringByAppendingString:co];
[request setValue:[NSString
stringWithFormat:@"%d", [postString length]]
forHTTPHeaderField:@"Content-length"];
[request setHTTPBody:[postString
dataUsingEncoding:NSUTF8StringEncoding]];
[[NSURLConnection alloc] initWithRequest:request delegate:self];