Latest 0.7.3
Homepage https://github.com/EugeneNguyen/XBCacheRequest
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, JSONKit-NoWarning, MBProgressHUD
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

XBCacheRequest is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "XBCacheRequest"

Getting Started

1. Import the most important header

#import <XBCacheRequest.h>

2. Start your request

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
}
}];

3. You can also disable cache system by adding

request.disableCache = YES;

4. And can set default host for the whole project just by

[[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");

Author

eugenenguyen, [email protected]

License

XBCacheRequest is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "XBCacheRequest",
    "version": "0.7.3",
    "summary": "XBCache request is an extension of AFNetwork, allow cached post request",
    "description": "XBCache request is an extension of AFNetwork, allow cached post request with several more optionnn* Markdown format.n* Don't worry about the indent, we strip it!",
    "homepage": "https://github.com/EugeneNguyen/XBCacheRequest",
    "license": "MIT",
    "authors": {
        "eugenenguyen": "[email protected]"
    },
    "source": {
        "git": "https://github.com/EugeneNguyen/XBCacheRequest.git",
        "tag": "0.7.3"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "XBCacheRequest": [
            "Pod/Assets/*"
        ]
    },
    "dependencies": {
        "AFNetworking": [],
        "JSONKit-NoWarning": [],
        "MBProgressHUD": []
    }
}

Pin It on Pinterest

Share This