网络请求 post 的接受请求头的代理方法

接收响应头

content-Length content-Type

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{

    NSHTTPURLResponse* res = (NSHTTPURLResponse*)response;

    float length = [[res.allHeaderFields objectForKey:@"Content-Length"] floatValue];

    NSLog(@"下载内容长度:%f", length);

}

原文地址:https://www.cnblogs.com/zhaozhongpeng/p/4867667.html