//
//  networkMaker.h
//  Project
//
//  Created by Vae on 2018/12/18.
//

#import <Foundation/Foundation.h>
#import "NetworkMakerBlocks.h"

@import PromiseKit;

@interface BasicNetworkMaker : NSObject

@property(nonatomic, strong) NSString *urlString;
@property(nonatomic, strong) NSString *method;
@property(nonatomic, strong) NSDictionary *header;
@property(nonatomic, strong) NSDictionary *paramter;
@property(nonatomic, assign) NSInteger requestEncoding;
@property(nonatomic, strong) NSMutableURLRequest *request;
@property(nonatomic, assign) NSTimeInterval timeoutInterval;
@property(nonatomic, strong) NSString *requestDataType;
@property(nonatomic, strong) NSString *responseDataType;
@property(nonatomic, copy) uploadProgressBlock uploadProgressBlock;
@property(nonatomic, copy) FormDataBlock formDataBlock;
@property(nonatomic, copy) HandleBlock beforeSendHandle;
@property(nonatomic, copy) HandleBlock completeHandle;
@property(nonatomic, copy) NetWorkFinishBlock errorHandle;
@property(nonatomic, copy) NetWorkFinishBlock successHandle;
@property(nonatomic, strong) AFHTTPSessionManager *manager;


-(NetWorkChainableString)makeUrl;
-(NetWorkChainableString)makeMethod;
-(NetWorkChainableDic)makeParamter;
-(NetWorkChainableDic)makeHeader;
-(NetWorkChainableNumber)makeRequestEncoding;
-(NetWorkChainableString)makeRequestDataType;
-(NetWorkChainableString)makeResponseDataType;
-(NetWorkChainableNumber)makeTimeoutInterval;
-(NetWorkChainableHandle)makeBeforeSendHandle;
-(NetWorkChainableHandle)makeCompleteHandle;
-(NetWorkChainableFinish)makeSuccessHandle;
-(NetWorkChainableFinish)makeErrorHandle;
-(NetWorkChainableBlock)makeUploadProgressBlock;
-(NetWorkChainableMultipartFormData)makeConstructingBodyWithBlock;

-(AnyPromise *)build;
-(AnyPromise *)netWorkTask;
-(AnyPromise *)uploadNetworkTask;
-(AnyPromise *)performBatchNetWorkRequest:(NSArray <AnyPromise *> *)array;
-(void)configManger;
-(void)configRequest;
@end

