分段下载ASIHTTP

来源:互联网 发布:上海软件中心 编辑:程序博客网 时间:2024/06/06 16:34

//    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

//    NSString *documentPath = [paths objectAtIndex:0];  

//

//    //初始化保存ZIP文件路径

//    NSString *savePath = [documentPath stringByAppendingPathComponent:[NSString stringWithFormat:@"test.mp3"]];

//    //初始化临时文件路径

//    NSString *tempPath = [documentPath stringByAppendingPathComponent:[NSString stringWithFormat:@"test2.mp3"]];

//    NSLog(@"%@,%@",savePath,tempPath);

    NSString *s = [NSStringstringWithString:[ResponseData shareResponseData].url];

[_httpRequest setRequestMethod:POST];

    [_httpRequest setDelegate:self];


//    //设置文件保存路径

//    [_httpRequest setDownloadDestinationPath:savePath];

//    //设置临时文件路径

//    [_httpRequest setTemporaryFileDownloadPath:tempPath];

// //设置是是否支持断点下载

// [_httpRequest setAllowResumeForFileDownloads:YES];

    [_httpRequest startAsynchronous];

放在请求函数


原创粉丝点击