IOS 打印网络请求全链接

    NSMutableString *urlStr = [NSMutableString stringWithFormat:@"%@?",request.URL];
 
    for (int i=0;i<[parameters count];++i)
    {
        (i==0)?:[urlStr appendString:@"&"];
        NSString *key = [[parameters allKeys] objectAtIndex:i];
        NSString *value = [[parameters allValues] objectAtIndex:i];
        
        [urlStr appendFormat:@"%@=%@",key,value];
    }
    NSLog(@"请求链接:%@",urlStr);

 

posted @ 2014-02-24 14:24  菜鸟程序猿  阅读(525)  评论(0编辑  收藏  举报