Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"POST /BBS/TestUpload": { "request": { "uEmail":"" }, "fileList": { "pic1":"{jpg}", "pic2":"{png}", "pic3":"{file}" } } 生成的post请求代码如下: if ( self.sending ) { if ( nil == self.req || NO == [self.req validate] ) { self.failed = YES; return; } NSString * requestURI = [[ServerConfig sharedInstance].url stringByAppendingString:@"/BBS/TestUpload"]; self.HTTP_POST( requestURI ).PARAM(@"json", [self.req objectToDictionary] ).FILE_JPG(@"pic1", self.fileList.pic1).FILE(@"pic3", self.fileList.pic3).FILE_PNG(@"pic2", self.fileList.pic2); } 使用方法如下: API_BBS_TESTUPLOAD *api = [API_BBS_TESTUPLOAD apiWithResponder:self]; api.fileList.pic3 = [[NSData alloc] init]; api.fileList.pic2 = [[UIImage alloc] init]; api.fileList.pic1 = [[UIImage alloc] init]; [api send];
- Loading branch information