快速的用POST请求上传文件:FBCNetworkPOSTTool
jopen
9年前
简介
快速的用POST请求上传文件
主要方法
// 多文件上传,可选择线程,默认为子线程, 带有UI操作时推荐此方法 - (void) POSTUploadFilesWithFollowQueue:(NSOperationQueue *)queue URLString:(NSString *)URLString filesDict:(NSDictionary *)filesDict textContent:(NSDictionary *)textContext webKey:(NSString *)webKey success:(SuccessBlock)SuccessBlock error:(ErrorBlock)ErrorBlock; // 单文件上传, 可选择线程, 默认为子线程, 带有UI操作时推荐此方法 - (void) POSTUploadFileWithFlollowQueue:(NSOperationQueue *)queue URLString:(NSString *)URLString filePath:(NSString *)filePath webKey:(NSString *)webKey webFileName:(NSString *)webFileName success:(SuccessBlock)SuccessBlock error:(ErrorBlock)ErrorBlock; // 多文件上传, 不可选择线程, 无UI操作时推荐操作 - (void) POSTUploadFilesWithURLString:(NSString *)URLString filesDict:(NSDictionary *)filesDict textContent:(NSDictionary *)textContext webKey:(NSString *)webKey success:(SuccessBlock)SuccessBlock error:(ErrorBlock)ErrorBlock; // 单文件上传, 不可选择线程, 无UI操作时推荐操作 - (void) POSTUploadFileWithURLString:(NSString *)URLString filePath:(NSString *)filePath webKey:(NSString *)webKey webFileName:(NSString *)webFileName success:(SuccessBlock)SuccessBlock error:(ErrorBlock)ErrorBlock; // 带参数的网络访问请求接口 - (void) POSTRequestWithURLString:(NSString *)URLString paramater:(NSDictionary *)paramater success:(SuccessBlock)SuccessBlock error:(ErrorBlock)ErrorBlock;
创建工具
[FBCNetworkPOSTTool sharedPOSTRequest];