您可以在不修改底层 AFNetworking 代码的情况下执行 datwalk 答案中的代码正在执行的操作。使用 AFNetworking 创建包含 URL 参数的路径:
NSDictionary *mutableParameters = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"csv",@"format", @"0",@"level", @"2013-10-25", @"keydate", nil];
NSString *urlPath = [NSString stringWithFormat:@"applications/%@/Planning?%@", name, AFQueryStringFromParametersWithEncoding(mutableParameters, NSUTF8StringEncoding)];
NSString *apiFunctionPath = [urlPath stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self putPath:apiFunctionPath
parameters:nil
success:^(AFHTTPRequestOperation *operation, id XML) {
NSLog(@"%@",XML);
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"%@",error);
}];