请求地址:/v5/Accounts/updateOrg.json
请求方式:POST
接口版本: 5.2.3
接口描述:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | NSString *httpUrl = @ "https://api-v2.1dq.com/v5/Accounts/updateOrg.json" ; NSString *httpArg = @ "easy_id=175984800321114112&id_number=123456789&id_type=1&name=测试机构021&org_legal_id_number=111111&org_legal_name=测试法人1" ; [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); } }]; } |