Git Product home page Git Product logo

mbtnetworking's Introduction

MBTNetworking

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.

mbtnetworking's People

Contributors

m4tbat avatar mxcl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yak0xff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.