Hi all,
im using the following code to open a connection
NSString *message = [NSString stringWithFormat:@"body of the message"];
NSURL *url = [NSURL URLWithString:@"sample url"];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody: [message dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
i have replaced the actual body and sample url with place holder strings for this post.
im getting the response saying request format error. Is there anything im missing?
Thanks in advance!