HttpGet请求传递数组(集合)

在HttpGet请求是传递数组(集合)的方法:

1.使用Ajax方法传递

eg:

ajax.({
    url:/test,
     data:["1","2"],
     type:"get"  
});

2.通过url直接传递的方式

这种方式我是通过第一种Ajax方法传递时,用Fiddler抓包发现的

转码后为:items[]=SaleNumLimit&items[]=test

所以url传递数组的方式为 

?arrayName[]=content1&arrayName[]=content2
原文地址:https://www.cnblogs.com/c-supreme/p/9928452.html