title: ASIHTTPRequest POST iPhone
body: <p>Here's a portion of the <a href="https://i.stack.imgur.com/TtxDJ.png" rel="noreferrer">html code</a> 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 </p>
  
  <p>NSHTTPURLResponse: 0x617bb20</p>
  
  <p>Though I managed to get it working for the login except i replaced body=%@ with user=%@&amp;pass=%@</p>
  
  <pre><code>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);
  }
  </code></pre>
  
  <p>Updated code using ASIHTTPRequest.</p>