拼接url地址
[test setRequestMethod:@"get"];
NSMutableString *parmastring = [NSMutableString string];
NSArray *allkeys = [postDic allKeys];
for (int i=0; i<[postDic count]; i++) {
NSString *key = [allkeys objectAtIndex:i];
NSString *value = [postDic objectForKey:key];
if ([value isKindOfClass:[NSString class]])
{
NSString *ssy = [value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[parmastring appendFormat:@"%@=%@",key,ssy];
}else{
[parmastring appendFormat:@"%@=%@",key,value];
}
if (i<postDic.count-1) {
[parmastring appendString:@"&"];
}
}