Closed cdoky closed 9 years ago
在json新增fileList,只有在POST的接口里面才会解析,eg //登陆 "POST /Interface/UserLogin": { "request": { "uEmail":"1", "uPwd":"2", }, "fileList": { "pic1":"{jpg}", "pic2":"{png}", "pic3":"{file}" }, "response": { "status":"100", "message":"", } },
//生成的代码如下 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_INTERFACE_USERLOGIN *api = [API_INTERFACE_USERLOGIN apiWithResponder:self]; api.fileList.pic1 = [[UIImage alloc] init]; api.fileList.pic2 = [[UIImage alloc] init]; api.fileList.pic3 = [[NSData alloc] init];
在json新增fileList,只有在POST的接口里面才会解析,eg //登陆 "POST /Interface/UserLogin": { "request": { "uEmail":"1", "uPwd":"2", }, "fileList": { "pic1":"{jpg}", "pic2":"{png}", "pic3":"{file}" }, "response": { "status":"100", "message":"", } },
//生成的代码如下 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_INTERFACE_USERLOGIN *api = [API_INTERFACE_USERLOGIN apiWithResponder:self]; api.fileList.pic1 = [[UIImage alloc] init]; api.fileList.pic2 = [[UIImage alloc] init]; api.fileList.pic3 = [[NSData alloc] init];