Here's a portion of the html code I'm trying to submit the textarea, much this textarea this forum uses to type in questions. It's not working, nothing gets sent and the type of response i get back is
NSHTTPURLResponse: 0x617bb20
Though I managed to get it working for the login except i replaced body=%@ with user=%@&pass=%@
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://forums.whirlpool.net.au%@", replyLink]];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setRequestMethod:@"POST"];
[request addRequestHeader:@"Content-Type" value:@"application/xml;charset=UTF-8;"];
[request setPostValue:@"test" forKey:@"body"];
[request setDelegate:self];
[request startAsynchronous];
- (void) requestFinished:(ASIHTTPRequest *)request {
//NSString *responseString = [request responseString];
NSLog(@"Response %d : %@", request.responseStatusCode, [request responseString]);
//NSData *responseData = [request responseData];
}
- (void) requestStarted:(ASIHTTPRequest *) request {
NSLog(@"request started...");
}
- (void) requestFailed:(ASIHTTPRequest *) request {
NSError *error = [request error];
NSLog(@"%@", error);
}
Updated code using ASIHTTPRequest.