Latest 0.0.3
Homepage https://github.com/lovemo/SUIMVVMNetwork
License MIT
Platforms ios 7.0, requires ARC
Frameworks CoreFoundation, Foundation, UIKit
Authors

SUIMVVMKit — SUIMVVMNetwork

====

usage

pod 'SUIMVVMNetwork'

====

introduction


@interface SMKHttp : NSObject

/**
 *  请求超时时间
 */
@property (nonatomic, assign) NSTimeInterval timeoutInterval;

/**
 *  创建单例对象
 */
+ (instancetype)defaultHttp;

/**
 *  移除所有缓存
 */
+ (void)removeAllCaches;

/**
 *  取消所有网络请求
 */
+ (void)cancelAllOperations;

/**
 *  GET请求 - 默认 MVVMHttpReloadIgnoringLocalCacheData 的缓存方式
 */
+ (void)get:(NSString *)url
     params:(NSDictionary *)params
    success:(requestSuccessBlock)successHandler
    failure:(requestFailureBlock)failureHandler;

/**
 *  POST请求 - 默认 MVVMHttpReloadIgnoringLocalCacheData 的缓存方式
 */
+ (void)post:(NSString *)url
      params:(NSDictionary *)params
     success:(requestSuccessBlock)successHandler
     failure:(requestFailureBlock)failureHandler;

/**
 *  GET请求
 */
+ (void)get:(NSString *)url
     params:(NSDictionary *)params
cachePolicy:(SMKHttpRequestCachePolicy)cachePolicy
    success:(requestSuccessBlock)successHandler
    failure:(requestFailureBlock)failureHandler;

/**
 *  POST请求
 */
+ (void)post:(NSString *)url
      params:(NSDictionary *)params
 cachePolicy:(SMKHttpRequestCachePolicy)cachePolicy
     success:(requestSuccessBlock)successHandler
     failure:(requestFailureBlock)failureHandler;

/**
 *  PUT请求
 */
+ (void)put:(NSString *)url
     params:(NSDictionary *)params
    success:(requestSuccessBlock)successHandler
    failure:(requestFailureBlock)failureHandler;

/**
 *  DELETE请求
 */
+ (void)deleteWithUrl:(NSString *)url
    params:(NSDictionary *)params
    success:(requestSuccessBlock)successHandler
    failure:(requestFailureBlock)failureHandler;

/**
 *  下载文件,监听下载进度
 */
+ (void)download:(NSString *)url
successAndProgress:(progressBlock)progressHandler
        complete:(responseBlock)completionHandler;

/**
 *  文件上传
 */
+ (void)upload:(NSString *)url
        params:(NSDictionary *)params fileConfig:(SMKHttpFileConfig *)fileConfig
       success:(requestSuccessBlock)successHandler
       failure:(requestFailureBlock)failureHandler;

/**
 *   文件上传,监听上传进度
 */
+ (void)upload:(NSString *)url
        params:(NSDictionary *)params
    fileConfig:(SMKHttpFileConfig *)fileConfig
successAndProgress:(progressBlock)progressHandler
      complete:(responseBlock)completionHandler;

@end

Latest podspec

{
    "name": "SUIMVVMNetwork",
    "version": "0.0.3",
    "summary": "SUIMVVMNetwork is a http request frameWork easy to develop iOS",
    "homepage": "https://github.com/lovemo/SUIMVVMNetwork",
    "platforms": {
        "ios": "7.0"
    },
    "license": "MIT",
    "authors": {
        "lovemo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/lovemo/SUIMVVMNetwork.git",
        "tag": "0.0.3"
    },
    "requires_arc": true,
    "public_header_files": "SUIMVVMNetwork/**/*.h",
    "source_files": "SUIMVVMNetwork/SMKNetworkPublic.h",
    "frameworks": [
        "CoreFoundation",
        "Foundation",
        "UIKit"
    ],
    "subspecs": [
        {
            "name": "SUIMVVMNetwork",
            "dependencies": {
                "AFNetworking": [
                    ">= 3.0"
                ],
                "SUIMVVMStore": []
            },
            "source_files": "SUIMVVMNetwork/SUIMVVMNetwork/**/*",
            "public_header_files": "SUIMVVMNetwork/**/*.h"
        }
    ]
}

Pin It on Pinterest

Share This