测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2016年1月 |
由 Eugene Nguyen 维护。
依赖 | |
AFNetworking | >= 0 |
JSONKit-NoWarning | >= 0 |
MBProgressHUD | >= 0 |
要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
。
XBCacheRequest 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中。
pod "XBCacheRequest"
#import <XBCacheRequest.h>
XBCacheRequest *request = XBCacheRequest(@"http://123.com/abc");
[request setDataPost:[@{@"foo": @"bar",
@"veryfoor": @"bartoo"} mutableCopy]];
[request startAsynchronousWithCallback:^(XBCacheRequest *request, NSString *result, BOOL fromCache, NSError *error) {
if (error)
{
// handle error
}
else
{
// handle response
}
}];
request.disableCache = YES;
[[XBCacheRequestManager sharedInstance] setHost:@"http://example.com"];
// and normally user request without host
XBCacheRequest *request = XBCacheRequest(@"abc");
// but even can work with another host
XBCacheRequest *request = XBCacheRequest(@"http://123.com/abc");
eugenenguyen,[email protected]
XBCacheRequest 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。