title: Sending an HTTP GET request xcode
body: <p>I'm trying to send the content of a contact form to my webservice.
  My code is based on a StackOverFlow topic named : Sending get method in Xcode .</p>
  
  <p>I think i follow the rules but it still doesn't work. I don't want u to lose your time, but i'm starting to get mad.</p>
  
  <pre><code>- (IBAction)send:(id)sender{
  
  
  NSString *get = [[NSString alloc] initWithFormat:@"&amp;Contact%%5BFirstName%%5D=%@+First&amp;Contact%%5BLastName%%5D=%@+Last&amp;Contact%%5BMail%%5D=%@&amp;Contact%%5BPhone%%5D=%@&amp;Contact%%5BMotivations%%5D=%@&amp;Contact%%5BCommentaires%%5D=%@",prenomtxtfield.text,nomtxtfield.text,emailtxtfield.text,teltxtfield.text,pvController.mail.motiv,questiontxtview.text];
  
  
  NSData *getData = [get dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
  
  NSString *getLength = [NSString stringWithFormat:@"%d", [getData length] ];
  
  NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
  [request setURL:[NSURL URLWithString:@"http://xxx.zfort.net/index.php?r=site/contactAdd"]];
  [request setHTTPMethod:@"GET"];
  [request setValue:getLength forHTTPHeaderField:@"Content-Length"];
  [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
  [request setHTTPBody:getData];
  </code></pre>
  
  <p>My fields are : Last Name , First Name , Mail, Phone , Motiv, Question .
  My webservice addr is : <a href="http://xxx.zfort.net/index.php" rel="nofollow">http://xxx.zfort.net/index.php</a>?</p>
  
  <p>Thank you all (even you're not responding... you've all already helped me in the past with your comments)</p>
  
  <p>PS: it may be an issue of encoding values ?</p>