這是PHP代碼:您需要的參數梅索德= GETALL一個POST電話:添加捲曲parmeter CURLOPT_USERPWD IOS
$濾鏡陣列=(); $ filters ['denomination'] ='T%';
$param = array(
'type_element' => 'personne_morale',
'order' => 'denomination',
'limit' => 2,
'filtres' => $filters
);
這是不工作它給我的錯誤代碼的ios:
NSError *錯誤;
NSURL *url = [NSURL URLWithString: @"https://www.eden-pme.com/edensoft/edenfiles/edensoft2014/api.php"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLResponse *response;
NSString *postString;
postString = [NSString stringWithFormat:@"api_public_key:api_private_key,6c8a4cf9044e48e4383b9f6a8f400055:94a337a9dd6fb58f5004f244187d5d39"];
[request setURL:url];
[request setHTTPMethod:@"POST"];
[request setValue:postString forHTTPHeaderField:@"Content-Type"];
// NSURLResponse *response;
NSData *res = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSArray *jsonArr = [NSJSONSerialization JSONObjectWithData:res options:kNilOptions error:&error];
NSLog(@"%@",jsonArr);
它不起作用 –