ASIHTTPRequest类库简介和使用说明
一、简介
1.概况
使用iOS SDK中的HTTP网络请求API,相当的复杂,调用很繁琐,ASIHTTPRequest就是一个对CFNetwork API进行了封装,并且使用起来非常简单的一套API,用Objective-C编写,可以很好的应用在Mac OS X系统和iOS平台的应用程序中。ASIHTTPRequest适用于基本的HTTP请求,和基于REST的服务之间的交互。
2.特色
ASIHTTPRequest功能很强大,主要特色如下:
- l 通过简单的接口,即可完成向服务端提交数据和从服务端获取数据的工作
- l 下载的数据,可存储到内存中或直接存储到磁盘中
- l 能上传本地文件到服务端
- l 可以方便的访问和操作请求和返回的Http头信息
- l 可以获取到上传或下载的进度信息,为应用程序提供更好的体验
- l 支持上传或下载队列,并且可获取队列的进度信息
- l 支持基本、摘要和NTLM身份认证,在同一会话中授权凭证会自动维持,并且可以存储在Keychain(Mac和iOS操作系统的密码管理系统)中
- l 支持Cookie
- l 当应用(iOS 4+)在后台运行时,请求可以继续运行
- l 支持GZIP压缩数据
- l 内置的ASIDownloadCache类,可以缓存请求返回的数据,这样即使没有网络也可以返回已经缓存的数据结果
- l ASIWebPageRequest –可以下载完整的网页,包括包含的网页、样式表、脚本等资源文件,并显示在UIWebView /WebView中。任意大小的页面都可以无限期缓存,这样即使没有网络也可以离线浏览
- l 支持客户端证书
- l 支持通过代理发起Http请求
- l 支持带宽限制。在iOS平台,可以根据当前网络情况来自动决定是否限制带宽,例如当使用WWAN(GPRS/Edge/3G)网络时限制,而当使用WIFI时不做任何限制
- l 支持断点续传
- l 支持同步和异步请求
二、安装说明
如果想在iOS项目中使用ASIHTTPRequest,需要在项目中进行简单的配置,步骤如下:
1.添加文件
http://c.tieba.baidu.com/p/3382490345
http://c.tieba.baidu.com/p/3382494682
http://c.tieba.baidu.com/p/3382498894
http://c.tieba.baidu.com/p/3382504524
http://c.tieba.baidu.com/p/3382620194
http://c.tieba.baidu.com/p/3382616420
http://c.tieba.baidu.com/p/3382612765
http://c.tieba.baidu.com/p/3382607942
http://c.tieba.baidu.com/p/3382624856
http://c.tieba.baidu.com/p/3382647804
http://c.tieba.baidu.com/p/3382652157
http://c.tieba.baidu.com/p/3382657909
http://c.tieba.baidu.com/p/3382661647
http://c.tieba.baidu.com/p/3382691379
http://c.tieba.baidu.com/p/3382672363
http://c.tieba.baidu.com/p/3382696270
http://c.tieba.baidu.com/p/3382702393
http://c.tieba.baidu.com/p/3382707585
http://c.tieba.baidu.com/p/3382712446
http://c.tieba.baidu.com/p/3382717122
http://c.tieba.baidu.com/p/3382721802
http://c.tieba.baidu.com/p/3382726406
http://c.tieba.baidu.com/p/3382731038
http://c.tieba.baidu.com/p/3382735589
http://c.tieba.baidu.com/p/3382740101
http://c.tieba.baidu.com/p/3382744553
http://c.tieba.baidu.com/p/3382749517
http://c.tieba.baidu.com/p/3382754323
http://c.tieba.baidu.com/p/3382758804
http://c.tieba.baidu.com/p/3382763511
http://c.tieba.baidu.com/p/3382768319
http://c.tieba.baidu.com/p/3382773161
http://c.tieba.baidu.com/p/3382777696
http://c.tieba.baidu.com/p/3382782294
http://c.tieba.baidu.com/p/3382787163
http://c.tieba.baidu.com/p/3382791794
http://c.tieba.baidu.com/p/3382796686
http://c.tieba.baidu.com/p/3382801522
http://c.tieba.baidu.com/p/3382806366
http://c.tieba.baidu.com/p/3382811268
http://c.tieba.baidu.com/p/3382859855
http://c.tieba.baidu.com/p/3382863765
http://c.tieba.baidu.com/p/3382872177
http://c.tieba.baidu.com/p/3382879803
http://c.tieba.baidu.com/p/3382884390
http://c.tieba.baidu.com/p/3382889038
http://c.tieba.baidu.com/p/3382893713
http://c.tieba.baidu.com/p/3382898183
http://c.tieba.baidu.com/p/3382902634
http://c.tieba.baidu.com/p/3382907141
http://c.tieba.baidu.com/p/3382911447
http://c.tieba.baidu.com/p/3382915770
http://c.tieba.baidu.com/p/3382920104
http://c.tieba.baidu.com/p/3382924450
http://c.tieba.baidu.com/p/3382928624
http://c.tieba.baidu.com/p/3382933026
http://c.tieba.baidu.com/p/3382937385
http://c.tieba.baidu.com/p/3382941568
http://c.tieba.baidu.com/p/3382945828
http://c.tieba.baidu.com/p/3382949995
http://c.tieba.baidu.com/p/3382954235
http://c.tieba.baidu.com/p/3382958537
http://c.tieba.baidu.com/p/3382962761
http://c.tieba.baidu.com/p/3382966995
http://c.tieba.baidu.com/p/3382971304
http://c.tieba.baidu.com/p/3382216718
http://c.tieba.baidu.com/p/3382244623
http://c.tieba.baidu.com/p/3382249656
http://c.tieba.baidu.com/p/3382254624
http://c.tieba.baidu.com/p/3382259490
http://c.tieba.baidu.com/p/3382264357
http://c.tieba.baidu.com/p/3382269259
http://c.tieba.baidu.com/p/3382274162
http://c.tieba.baidu.com/p/3382279057
http://c.tieba.baidu.com/p/3382283973
http://c.tieba.baidu.com/p/3382288919
http://c.tieba.baidu.com/p/3382293811
http://c.tieba.baidu.com/p/3382298642
http://c.tieba.baidu.com/p/3382303592
http://c.tieba.baidu.com/p/3382364528
http://c.tieba.baidu.com/p/3382367336
http://c.tieba.baidu.com/p/3382370615
http://c.tieba.baidu.com/p/3382374623
http://c.tieba.baidu.com/p/3382378599
http://c.tieba.baidu.com/p/3382382538
http://c.tieba.baidu.com/p/3382386544
http://c.tieba.baidu.com/p/3382390638
http://c.tieba.baidu.com/p/3382394866
http://c.tieba.baidu.com/p/3382398971
http://c.tieba.baidu.com/p/3382403284
http://c.tieba.baidu.com/p/3382407570
http://c.tieba.baidu.com/p/3382411934
http://c.tieba.baidu.com/p/3382416307
http://c.tieba.baidu.com/p/3382420917
http://c.tieba.baidu.com/p/3382425138
http://c.tieba.baidu.com/p/3382420917
http://c.tieba.baidu.com/p/3382438097
http://c.tieba.baidu.com/p/3382461739
http://c.tieba.baidu.com/p/3382451160
http://c.tieba.baidu.com/p/3382216718
http://c.tieba.baidu.com/p/3382244623
http://c.tieba.baidu.com/p/3382249656
http://c.tieba.baidu.com/p/3382254624
http://c.tieba.baidu.com/p/3382259490
http://c.tieba.baidu.com/p/3382264357
http://c.tieba.baidu.com/p/3382269259
http://c.tieba.baidu.com/p/3382274162
http://c.tieba.baidu.com/p/3382279057
http://c.tieba.baidu.com/p/3382283973
http://c.tieba.baidu.com/p/3382288919
http://c.tieba.baidu.com/p/3382293811
http://c.tieba.baidu.com/p/3382298642
http://c.tieba.baidu.com/p/3382303592
http://c.tieba.baidu.com/p/3382364528
http://c.tieba.baidu.com/p/3382367336
http://c.tieba.baidu.com/p/3382370615
http://c.tieba.baidu.com/p/3382374623
http://c.tieba.baidu.com/p/3382378599
http://c.tieba.baidu.com/p/3382382538
http://c.tieba.baidu.com/p/3382386544
http://c.tieba.baidu.com/p/3382390638
http://c.tieba.baidu.com/p/3382394866
http://c.tieba.baidu.com/p/3382398971
http://c.tieba.baidu.com/p/3382403284
http://c.tieba.baidu.com/p/3382407570
http://c.tieba.baidu.com/p/3382411934
http://c.tieba.baidu.com/p/3382416307
http://c.tieba.baidu.com/p/3382420917
http://c.tieba.baidu.com/p/3382425138
http://c.tieba.baidu.com/p/3382420917
http://c.tieba.baidu.com/p/3382438097
http://c.tieba.baidu.com/p/3382461739
http://c.tieba.baidu.com/p/3382451160
往一个Xcode项目中添加第三方类库文件,有两种方式:
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。