Latest 0.1.1
Homepage https://github.com/hrx00747/NFNetwork
License MIT
Platforms ios 8.0
Dependencies AFNetworking
Frameworks UIKit, Foundation
Authors

CI Status
Version
License
Platform

Example

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

Requirements

Installation

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

pod "NFNetwork"

How to Use

Common apis usually share scheme,host and path prefix.
So first you should set these common values:

[NFHttpRequest setScheme:@"http"];
[NFHttpRequest setHost:@"api.company.com"];
[NFHttpRequest setPathPrefix:@"app"];

Then you should define a request class inherit from NFHttpRequest

@interface TestRequest : NFHttpRequest

@end

Finally, you can use it like this:

TestRequest *request = [][TestRequest allo] init];
[request sendWithSuccess:^(id responseObject) {

NSLog(@"responseObject = %@", responseObject);

} failure:^(NSError *error) {

NSLog(@"error = %@",error);
}];

Author

hrx00747, [email protected]

License

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

Latest podspec

{
    "name": "NFNetwork",
    "version": "0.1.1",
    "summary": "a wrap of afnetworking",
    "description": "a wrap of afnetworking providing some convineint class",
    "homepage": "https://github.com/hrx00747/NFNetwork",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ruxue.huang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hrx00747/NFNetwork.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NFNetwork/Classes/**/*",
    "public_header_files": "NFNetwork/Classes/**/*.h",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "dependencies": {
        "AFNetworking": [
            "~> 3.1"
        ]
    }
}

Pin It on Pinterest

Share This