37 lines
1.2 KiB
Objective-C
37 lines
1.2 KiB
Objective-C
//
|
|
// GiGaNetManager.h
|
|
// GIGA
|
|
//
|
|
// Created by lianxiang on 2018/8/15.
|
|
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "GiGaBaseAPiRequest.h"
|
|
|
|
typedef void (^responseBlock)(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error);
|
|
|
|
@interface GiGaNetManager : NSObject
|
|
|
|
+ (void)requestMethod:(RequestMethod)requestMethod Url:(NSString *)url params:(NSDictionary *)params responseBlock:(responseBlock)block;
|
|
|
|
+(void)request:(NSString *)url params:(NSDictionary *)param
|
|
success:(void (^)(id response))success
|
|
failure:(void (^)(NSError *err))failure;
|
|
|
|
// 测试题 ,登录 .. body 传参
|
|
+(void)userbodyRequest:(NSString *)url params:(NSDictionary *)param completionHandler:(nullable void (^)(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error))completionHandler;
|
|
|
|
//上传图片 1张
|
|
+(void)uploadImage:(NSString *)url
|
|
imgData:(NSData *)imgData
|
|
parms:(NSDictionary *)parms
|
|
responseBlock:(responseBlock)block;
|
|
|
|
+(void)uploadImage:(NSString *)url
|
|
imageNames:(NSArray *)imageNames
|
|
parms:(NSDictionary *)parms
|
|
responseBlock:(responseBlock)block;
|
|
|
|
@end
|