AFNetworking下载,设置请求头
作者:
偷的浮生整日闲 | 来源:发表于
2019-09-19 09:16 被阅读0次
使用AFNetworking下载文件时,为期设置请求头,如下:
NSString * urlStr = [NSString stringWithFormat:urlString];
NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] requestWithMethod:@"GET" URLString:urlStr parameters:nil error:nil];
[request setValue:@"xxxxxxxx" forHTTPHeaderField:@"sessionId"];
NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) .......
本文标题:AFNetworking下载,设置请求头
本文链接:https://www.haomeiwen.com/subject/leoiyctx.html
网友评论