title: make curlopt_userpwd post request in ios
body: <p>This is the php code :<br>
    methode = getAll
          filters = array();</p>
  
  <pre><code>    filters['denomination']  = 'T%';
  
      param = array(
       'type_element' =&gt; 'personne_morale',
       'order' =&gt; 'denomination',
       'limit' =&gt; 2,
       'filtres' =&gt; $filters
       );
      filters is the filters (like the first letter of the name of the company, example here is 'T')
      you don't need limit = 2
  </code></pre>
  
  <p>My Code is not working it gives error:</p>
  
  <pre><code>    NSURL *url = [[NSURL alloc]initWithString:[NSString stringWithFormat:@"https://www.eden-pme.com/edensoft/edenfiles/edensoft2014/api.php?methode=getAll"]];
  NSString *postString = [NSString stringWithFormat:@"94a337a9dd6fb58f5004f244187d5d39:6c8a4cf9044e48e4383b9f6a8f400055"];
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url                                                    cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
  [request setHTTPMethod:@"POST"];
  [request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
  NSURLResponse *response;
  NSError *error;
  NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  NSString *str = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error];
  </code></pre>