设为首页 加入收藏

TOP

iOS开发-AFNetworking封装Get(自定义HTTP Header)和Post请求及文件下载(二)
2017-10-11 13:57:17 】 浏览:2635
Tags:iOS 开发 -AFNetworking 封装 Get 定义 HTTP Header Post 请求 文件下载
r downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) {

        /**

         *  下载进度

         */

        downloadFileProgress(downloadProgress);

        

    } destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) {

        /**

         *  设置保存目录

         */        

        return setupFilePath(response);

    } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) {

        /**

         *  下载完成

         */

        downloadCompletionHandler(filePath,error);

    }];

    [dataTask resume];

}

如有错误,还望指出!

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇iOS开发-生成二维码图片【附中间.. 下一篇iOS:UITableView相关(17-10-10..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目