| 12345678910111213141516171819202122232425 |
- //
- // NetworkUtils.h
- // AntsContract
- //
- // Created by Ray on 12/26/16.
- // Copyright © 2016 United Software Applications, Inc. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "const.h"
- typedef NSMutableDictionary*(^resultBlock)(NSMutableDictionary* result);
- typedef NSMutableDictionary*(^decryptBlock)(NSMutableDictionary* result);
- typedef void(^resultHandler)(NSMutableDictionary *result);
- typedef void(^progressHandler)(NSURLSessionTask *task,double progress);
- @interface NetworkUtils : NSObject
- +(bool) IsNetworkAvailable;
- +(NSData*)get_json : (NSString*) url parameters:(NSMutableDictionary *) params file:(NSString*)file_path err_recorder:(NSString* )recorder_url result_handler:(resultBlock)resultBlock decrypt_handler:(decryptBlock)decryptBlock;
- +(NSDictionary*)err_log:(NSString*) up_params result:(NSString*)result module:(NSString*) module code:(int) code;
- + (NSURLSessionTask *)upload:(NSString *)filePath Params:(NSDictionary *)params ToHost:(NSString *)url Result:(resultHandler)r Progress:(progressHandler)p DecryptHandler:(id(^)(NSString *result))decrypt;
- @end
|