Latest 1.0.1
Homepage https://github.com/xiaofei86/LPNetworking
License MIT
Platforms ios 7.0
Authors

LICENSE 
PLATFORM 
SUPPORT 
BLOG 

轻量网络请求,不到100行代码。仅有两个接口,异步GET和异步POST。

OneLine

+ (void)Get:(NSString *)URLString parameters:(NSDictionary *)parameters completion:(LPNetworkRequestCompletionBlock)completionBlock;

+ (void)Post:(NSString *)URLString parameters:(NSDictionary *)parameters completion:(LPNetworkRequestCompletionBlock)completionBlock;

More

  • 数据返回的回调如下。result和error必有一个有值。可以据此判断返回状态。

    typedef void (^LPNetworkRequestCompletionBlock)(NSDictionary result, NSURLResponse response, NSError *error);

  • 请求时会打印请求链接、返回数据或错误信息。如果是POST请求会在请求链接后打印请求参数。

Latest podspec

{
    "name": "LPNetworking",
    "version": "1.0.1",
    "summary": "smart network request",
    "homepage": "https://github.com/xiaofei86/LPNetworking",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "XuYafei": "[email protected]"
    },
    "social_media_url": "http://xuyafei.cn",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/xiaofei86/LPNetworking.git",
        "tag": "1.0.1"
    },
    "source_files": "LPNetworking/*.{h,m}"
}

Pin It on Pinterest

Share This