Skip to content

A tiny and legant Network abstraction layer with ReactiveObjC.

License

Notifications You must be signed in to change notification settings

Maru-zhang/MARNetwork

Repository files navigation

MARNetwork

CI Status Version License Platform

What

MARNetwork is a tiny and elegant High Level Network Layer inspire by Moya,Masonry and RESTful,which can fluent bridge with ReactiveObjc, and then you can enjoy with your FRP ...

Example

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

Introduction

usage

MAREntity *entity = MARDispatchCenter.mainChannel;

RACSignal *signal = entity.get.getRequest(nil).start;

[signal subscribeNext:^(id  _Nullable x) {
    NSLog(@"success:%@",x);
}];

[signal subscribeError:^(NSError * _Nullable error) {
    NSLog(@"failure:%@",error);
}];

[signal subscribeCompleted:^{
    NSLog(@"completed");
}];

Requirements

MARNetwork supports OS X 10.8+ and iOS 8.0+.

Installation

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

pod "MARNetwork"

Author

Maru-zhang, maru-zhang@foxmail.com

License

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