If you want to use HTTP, I suggest the NSURLConnection class. For example, to use a POST request with headers, do the following:
int kTimeoutInterval = 30;
NSString *post = @"Something to post";
NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding];
NSString *postLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]];
NSString *link = @"http://some_link";
link = [link stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:link] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:kTimeoutInterval];
[request setURL:[NSURL URLWithString:link]];
[request setHTTPMethod:@"POST"];
[request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)[postLength length]] forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody:postData];
NSError *error;
NSURLResponse* response=nil;
NSData* data=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
, , , , , kTimeoutInterval. :
[NSURLConnection connectionWithRequest...
. , , , NSURLConnection. , ...