Latest 0.4
Homepage https://github.com/madbat/MBTNetworking
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, Mantle, PromiseKit/Promise
Authors

Version
License
Platform

Usage

Here’s an excerpt from the super-minimal example project which demonstrates instantiating the manager pointing to http://httpbin.org, performing two sequential requests to get some data, and consuming the parsed response objects:

MBTNetworkManager *manager = [[MBTNetworkManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://httpbin.org"]];

[manager performRequest:[MBTSampleRequests get]].then(^(MBTHTTPBinGetModel *getModel, NSURLSessionTask *task) {
    NSLog(@"Origin: %@", getModel.origin);
    NSLog(@"User-Agent: %@", getModel.headers.userAgent);

    return [manager performRequest:[MBTSampleRequests headers]];
}).then(^(MBTHTTPBinHeadersModel *headersModel, NSURLSessionTask *task) {
    NSLog(@"Headers: %@", headersModel);
}).catch(^(NSError *error) {
    NSLog(@"Error: %@", error);
});

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

Requirements

MBTNetworking requires iOS 7.0+

Installation

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

pod "MBTNetworking"

Author

Matteo Battaglio, http://twitter.com/@m4dbat

License

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

Latest podspec

{
    "name": "MBTNetworking",
    "version": "0.4",
    "summary": "A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit.",
    "description": "                          A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit.n                          The aim of MBTNetworking is to streamline the implementation ofn                          requests to REST APIs and the mapping of the response objects ton                          model objects.n",
    "homepage": "https://github.com/madbat/MBTNetworking",
    "license": "MIT",
    "authors": {
        "Matteo Battaglio": "[email protected]"
    },
    "source": {
        "git": "https://github.com/madbat/MBTNetworking.git",
        "tag": "0.4"
    },
    "social_media_url": "https://twitter.com/m4dbat",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "MBTNetworking": [
            "Pod/Assets/*.png"
        ]
    },
    "dependencies": {
        "AFNetworking": [
            "~> 2.5"
        ],
        "Mantle": [
            "~> 2.0"
        ],
        "PromiseKit/Promise": [
            "~> 1.2"
        ]
    }
}

Pin It on Pinterest

Share This