这是方法头:
@IocBean
@At("/sysaspx")
@Ok("json")
@Fail("http:500")
@Encoding(input = "UTF-8", output = "UTF-8")
public class RecordModule extends BaseModule {
private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(RecordModule.class);
@At("/apk")
@AdaptBy(type = PairAdaptor.class)
@GET
public NutMap addrecord(@Param("MachineId") String MachineId, @Param("RecordList") List<Record> recordList) {
LOGGER.info("MachineId : {},插入Record{}", MachineId, recordList);
NutMap re = new NutMap();
...
想用get请求去请求他,这样写url会报400。。求正确的请求方式,
RecordList是Record对象集合
http://localhost:8888/sysaspx/apk.aspx?MachineId=001056&RecordList=[{"RecID":"1","ItemIndex0":"0","ItemIndex":"0","SubItemIndex":"0","ItemName":"农残","ChannelID":"1","SampleName":"大白菜","AbsorbX":"0.1","CalcResult":"0","TestLimit":"<50","CheckResult":"1","TxtResult":"合格","UintName":"抑制率","Uint":"%","Supplier":"检测单位未设置","ProducePlace":"被检单位未设置","UploadFlag":"0","CheckPerson":"检测员未设置","CodeId":"0","TestTime":"11:50:44.000","TestDate":"2016-07-26","NcItemName":"null","NcValue":"0","Temperature":"null","Humidity":"null","GPS":"null","Result":"null","TypeName":"null","DTI_ID":"T05230163083947084"}]