Skip to content

201528013329008/JYDownloadCon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JYDownloadCon

HTTP request中加入“Range”头实现断点续传

       // 创建请求
        NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString: self.downLoadUrl]];

        // 设置请求头
        // Range : bytes=xxx-xxx,从已经下载的长度开始到文件总长度的最后都要下载
        NSString *range = [NSString stringWithFormat:@"bytes=%zd-",  DownloadLength];
        [request setValue:range forHTTPHeaderField:@"Range"];

About

HTTP request中加入“Range”头实现断点续传

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published