请求地址:/v5/Contracts/signedByKeyword.json
请求方式:POST
接口版本: 5.2.3
接口描述:
NSString *httpUrl = @"https://api-v2.1dq.com/v5/Contracts/signedByKeyword.json";
NSString *httpArg = @"easy_id=175592531139104768&signed_data=[ { "seal_id":"deb4cf5e-ed14-11ea-aa79-0242ac110007", "keyword":"my-keyword-01" }, { "seal_id":"4cde8b9e-ebfa-11ea-b678-0242ac110011", "keyword":"my-keyword-02" } ]&words_id=&certification_code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9&certification_type=mobile";
[self request: httpUrl withHttpArg: httpArg];
-(void)request: (NSString*)httpUrl withHttpArg: (NSString*)HttpArg {
NSString *urlStr = [[NSString alloc]initWithFormat: @"%@?%@", httpUrl, HttpArg];
NSURL *url = [NSURL URLWithString: urlStr];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 10];
[request setHTTPMethod: @"GET"];
[NSURLConnection sendAsynchronousRequest: request
queue: [NSOperationQueue mainQueue]
completionHandler: ^(NSURLResponse *response, NSData *data, NSError *error){
if (error) {
NSLog(@"Httperror: %@%ld", error.localizedDescription, error.code);
} else {
NSInteger responseCode = [(NSHTTPURLResponse *)response statusCode];
NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"HttpResponseCode:%ld", responseCode);
NSLog(@"HttpResponseBody %@",responseString);
}
}];
}