IPhone开发中的HTTP链接问题
来源:互联网 发布:2014网络女歌手名字 编辑:程序博客网 时间:2024/05/21 00:18
HTTP链接有很多中方法,在这里介绍一个简单的GET链接,以后不断更新
源码source 如下:
+ (NSData *)Get: (NSString *)url{
NSError *error = nil; //create a error intance
[[NSURLCache sharedURLCache] removeAllCachedResponses];
NSURL *urlURL = [NSURL URLWithString:url];
NSURLRequest *currentUrlRequest = [NSURLRequest requestWithURL:urlURL]; //make a request
NSData *returnData = [NSURLConnection sendSynchronousRequest:currentUrlRequest returningResponse:nil error:&error]; //conncet and get response,there are some another methods which you can study by yourself.
if (error) {
NSLog(@"%@",[error localizedDescription]);
return nil;
}
return returnData;
}
继续连载 下次是文件传输
- IPhone开发中的HTTP链接问题
- iPhone开发-- 静态链接库问题
- IPhone开发中的相关问题
- iphone 开发链接
- iphone 开发文章链接
- iphone开发好文章链接
- iphone开发精品博客链接
- http链接的问题
- iPhone 开发之HTTP POST
- iphone开发 http post get
- IPhone 开发中的错误
- iphone开发中的CALayer
- Iphone中的UIView开发
- iPhone开发中的国际化
- iphone开发中的delegate
- [iphone开发]过程中的问题与解决方法
- Iphone开发问题集
- Iphone开发问题集
- 工作五年的回顾和感悟
- mobile6.1 设置Wifi扫描间隔
- 多target iphone
- Linux平台上如何使用接静态库和共享库
- iphone 实现截屏的函数
- IPhone开发中的HTTP链接问题
- 消息称电信将于10月引入两款CDMA版iPhone
- NIO中异步IO的完整实现实例
- 研究牛人的程序struct-dump.h
- 黑马程序员--javaAPI
- linux查看硬件信息及驱动设备相关整理(留存验证)
- Android 获取自己程序APK包的MD5指纹
- DWR的异常处理及session过期
- Ubuntu桌面版讨论使用全局菜单和取消的命令