本文為您提供了Objective-C語言版本的提交查詢接口對接DEMO示例
NSString *host = @"api.ihuyi.com";
NSString *path = "/idcard/idcardstatus/Submit.json";
NSString *method = @"POST";
NSString *querys = @"?account=xxxxxxxx&password=xxxxxxxxx&name=張三&id_card_no=40122111******&begin_date=20050712&end_date=20050712&time=1623643787&";
NSString *url = [NSString stringWithFormat:@"%@%@%@", host, path , querys];
NSString *bodys = @"";
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: url] cachePolicy:1 timeoutInterval: 5];
request.HTTPMethod = method;
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSURLSession *requestSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSURLSessionDataTask *task = [requestSession dataTaskWithRequest:request
completionHandler:^(NSData * _Nullable body , NSURLResponse * _Nullable response, NSError * _Nullable error) {
NSLog(@"Response object: %@" , response);
NSString *bodyString = [[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding];
//打印body內(nèi)容
NSLog(@"Response body: %@" , bodyString);
}];
[task resume];
國內(nèi)專業(yè)互聯(lián)網(wǎng)團隊
21年行業(yè)經(jīng)驗
7x24小時售后支持
豐富的行業(yè)經(jīng)驗
Copyright ? 2004-2025 上海思銳信息技術(shù)有限公司 All rights reserved. 滬ICP備07035915號-15 電信增值業(yè)務許可證:B2-20160082
服務熱線:
4008 808 898
服務熱線(工作時間):
4008 808 898
業(yè)務咨詢(非工作時間):
售后咨詢(非工作時間):
驗證碼已發(fā)送到您的手機,請查收!
輸入驗證碼后,點擊“開通體驗賬戶”按鈕可立即開通體驗賬戶。