How do I upload to a server using obj-c?
Here's what I have so far:
-(void)uploadSchedule

id)sender
{
NSData *content = [NSData dataWithContentsOfFile:self.dataFilePath];
NSString *stuff = [[NSString alloc] initWithData:content encoding:NSASCIIStringEncoding];
NSURL *url = [NSURL URLWithString:@"http://thetis.lunarmania.com"];
NSMutableURLRequest* urlRequest = [[NSMutableURLRequest alloc]initWithURL:url];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setHTTPBody:[stuff dataUsingEncoding:NSASCIIStringEncoding]];
NSLog(@"great success!");
}
I have all of the necessary methods such as didReceiveResponse, didReceiveData etc. However, when I connect to the server it doesn't display anything.
Please help.
Matt