title: IOS how to POST GET DELETE PUT Rest Api
body: <p>I am building my App conected to a Rest API and until now I only made a GET request with the following code :</p>
  
  <pre><code>//Start login process
  NSString *emailstring = email.text;
  NSString *passstring = pass.text;
  
  // Create the URL from a string.
  NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.myserver.com/Rest/API/users?format=json&amp;email=%@&amp;password=%@",emailstring,passstring]];
  NSLog(@"%@",url);
  
  // Create a request object using the URL.
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  
  // Prepare for the response back from the server    
  NSHTTPURLResponse *response = nil;
  NSError *error = nil;
  
  // Send a synchronous request to the server (i.e. sit and wait for the response)
  NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  NSLog(@"Reponse from web:%@", response);
  
  // Check if an error occurred    
  if (error != nil) {
      NSLog(@"%@", [error localizedDescription]);
      // Do something to handle/advise user.
  
      UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Login error"
                                                        message:@""
                                                       delegate:nil
                                              cancelButtonTitle:@"OK"
                                              otherButtonTitles:nil];
      [message show];
  
  }
  
  else {
  
      // Convert the response data to a string.
      NSString *responseString = [[NSString alloc] initWithData:responseData  encoding:NSUTF8StringEncoding];
  
      // View the data returned - should be ready for parsing.
      NSLog(@"%@", responseString);
  
      // Add data to a Plist file for next time
      NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
      NSString *documentsDirectory = [paths objectAtIndex:0];
      NSString *path = [documentsDirectory stringByAppendingPathComponent:@"login.plist"];
  
      NSArray *values = [[NSArray alloc] initWithObjects:emailstring,passstring,@"IDtest",nil];
      [values writeToFile:path atomically:YES];
      [values release];
  
  
      [self dismissModalViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>This code work fine just for a GET request. I saw it is there a lot of framework (e.g RestKit, ....). But I am getting a bit lost with other request ! So what is the best solution to make POST DELETE PUT request for an IOS App ?</p>