CoreNetworking 1.0.7

CoreNetworking 1.0.7

测试已测试
语言语言 Objective-CObjective C
许可证 MIT
发布最后发布2016年2月

Gabriel Massana维护。



  • Gabriel Massana

CoreNetworking-iOS

简化NSURLSession的包装项目。

如何安装

Podfile

platform :ios, '8.0'
pod 'CoreNetworking', '~> 1.0'

老方法

将文件夹/CoreNetworking-iOS拖入您的项目中。这就完成了。

示例

#import "CNMSession.h"
#import "CNMRequest.h"
#import "CNMURLSessionDataTask.h"

...

    CNMRequest *request = [[CNMRequest alloc] init];
    request.URL = [NSURL URLWithString:@"http://exampleapi.com/json"];

    CNMURLSessionDataTask *task = [[CNMSession defaultSession] dataTaskFromRequest:request];

    task.onCompletion = ^void(NSData *data, NSURLResponse *response, NSError *error)
    {
        if (!error)
        {
            // Raw data to JSON.
            NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data
                                                                 options: NSJSONReadingMutableContainers
                                                                   error: nil];
        }
        else
        {
            NSLog(@"error %@", error);
        }
    };

    [task resume];

许可证

ButtonBackgroundColor-iOS遵守MIT许可证。请参阅名为LICENSE的文件。

版本

$ git tag -a 1.0.0 -m 'Version 1.0.0'

$ git push --tags

作者

Gabriel Massana

发现了一个问题?

如果您遇到CoreNetworking-iOS特定的难题,或者有大功能请求,或者想留下评论,请在这里新建问题