1 Star 1 Fork 1

宿命 / asi-http-request

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

精简一下demo,只保留了我用的-_-#
添加了POST请求缓存,开启缓存机制后,GET,POST都会缓存
清除缓存有4个方法

清除所有缓存
- (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)cachePolicy;

清除一条缓存,basePath为路径,比如@"/order/list"
- (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)cachePolicy withBasePath:(NSString*) basePath;

清除basePath以外的所有缓存,basePath为路径,比如@"/order/list"
- (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)cachePolicy withoutBasePath:(NSString*) basePath;

清除basePathArray以外的所有缓存,basePathArray为basePath数组,比如@["/order/list",“/order/detail”]
- (void)clearCachedResponsesForStoragePolicy:(ASICacheStoragePolicy)cachePolicy withoutBasePathArray:(NSArray*) basePathArray;

可根据需要自行修改

ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that makes some of the more tedious aspects of communicating with web servers easier. It is written in Objective-C and works in both Mac OS X and iPhone applications.

It is suitable performing basic HTTP requests and interacting with REST-based services (GET / POST / PUT / DELETE). The included ASIFormDataRequest subclass makes it easy to submit POST data and files using multipart/form-data.

It provides:

  • A straightforward interface for submitting data to and fetching data from webservers
  • Download data to memory or directly to a file on disk
  • Submit files on local drives as part of POST data, compatible with the HTML file input mechanism
  • Stream request bodies directly from disk to the server, to conserve memory
  • Resume for partial downloads
  • Easy access to request and response HTTP headers
  • Progress delegates (NSProgressIndicators and UIProgressViews) to show information about download AND upload progress
  • Auto-magic management of upload and download progress indicators for operation queues
  • Basic, Digest + NTLM authentication support, credentials are automatically re-used for the duration of a session, and can be stored for later in the Keychain.
  • Cookie support
  • [NEW] Requests can continue to run when your app moves to the background (iOS 4+)
  • GZIP support for response data AND request bodies
  • The included ASIDownloadCache class lets requests transparently cache responses, and allow requests for cached data to succeed even when there is no network available
  • [NEW] ASIWebPageRequest – download complete webpages, including external resources like images and stylesheets. Pages of any size can be indefinitely cached, and displayed in a UIWebview / WebView even when you have no network connection.
  • Easy to use support for Amazon S3 – no need to fiddle around signing requests yourself!
  • Full support for Rackspace Cloud Files
  • [NEW] Client certificates support
  • Supports manual and auto-detected proxies, authenticating proxies, and PAC file auto-configuration. The built-in login dialog lets your iPhone application work transparently with authenticating proxies without any additional effort.
  • Bandwidth throttling support
  • Support for persistent connections
  • Supports synchronous & asynchronous requests
  • Get notifications about changes in your request state via delegation or [NEW] blocks (Mac OS X 10.6, iOS 4 and above)
  • Comes with a broad range of unit tests

ASIHTTPRequest is compatible with Mac OS 10.5 or later, and iOS 3.0 or later.

Documentation is available here.

空文件

简介

Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone 展开 收起
Objective-C
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/zhfish/asi-http-request.git
git@gitee.com:zhfish/asi-http-request.git
zhfish
asi-http-request
asi-http-request
master

搜索帮助