- (void)SomeServiceMethod
{
NSData *thumbsupData = [[NSString stringWithFormat:
@"<rootElement> \
<element> \
<line_id>%@</line_id> \
<thumbsup>%@</thumbsup> \
</element> \
</rootElement>", line_id]
dataUsingEncoding: NSASCIIStringEncoding];
NSString *URLstr = SOME_URL;
NSURL *theURL = [NSURL URLWithString:URLstr];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:theURL];
[theRequest setHTTPMethod:@"POST"];
[theRequest setValue:@"text/xml"forHTTPHeaderField:@"Content-type"];
[theRequest setHTTPBody:thumbsupData];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:TRUE];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if(!theConnection){
NSLog(@"Error, Invalid Request");
}
}