ASIHTTPRequest發送異步請求方法之一
来源:互联网 发布:主机是数据终端设备吗 编辑:程序博客网 时间:2024/04/29 12:18
下載ASIHTTPRequest
加入Framework: CFNetwork.framework,SystemConfiguration.framework,MobileCoreServices.framework
__block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:sourceURL];
[request setCompletionBlock:^{
NSLog(@"Zip file downloaded.");
NSData *data = [request responseData];
[self processZip:data sourceURL:sourceURL];
}];
[request setFailedBlock:^{
NSError *error = [request error];
NSLog(@"Error downloading zip file: %@", error.localizedDescription);
}];
[request startAsynchronous];
加入Framework: CFNetwork.framework,SystemConfiguration.framework,MobileCoreServices.framework
__block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:sourceURL];
[request setCompletionBlock:^{
NSLog(@"Zip file downloaded.");
NSData *data = [request responseData];
[self processZip:data sourceURL:sourceURL];
}];
[request setFailedBlock:^{
NSError *error = [request error];
NSLog(@"Error downloading zip file: %@", error.localizedDescription);
}];
[request startAsynchronous];
- ASIHTTPRequest發送異步請求方法之一
- 开源类库之一 (ASIHTTPRequest)
- ASIHTTPRequest清除keyChain方法
- ASIHttpRequest常用方法
- ASIHttpRequest常用方法
- ASIHttpRequest常用方法
- ASIHttpRequest常用方法
- ASIHTTPRequest拓展UIImageView的方法
- ASIHTTPRequest
- ASIHTTPRequest
- ASIHTTPRequest
- ASIHTTPRequest
- ASIHTTPRequest
- ASIHTTPRequest
- ASIHTTPRequest
- asihttprequest
- ASIHTTPRequest
- ASIHTTPRequest
- PAT上机题解析之1002. 写出这个数 (20)
- NMAKE参考之四——描述块
- 使用activex自动更新,部署多插件及插件更新
- [2014微软笔试]按要求调整链表元素顺序,空间复杂度O(1)
- 2013年9月30日、|关于SVN客户端的安装 和SVN ChecKOUt 使用
- ASIHTTPRequest發送異步請求方法之一
- Oracle数据库监听配置
- Application Loader 使用图解教程
- Android 详解之Handler与Looper
- SQL Server 2008安装注意事项
- cat 循环读取文件内容
- 追踪线程池所有线程是否执行完毕
- 致我们即将逝去的大学
- IIS7.5中神秘的ApplicationPoolIdentity