yeecai / front-end-trivia

My collection of knowledge about JS/React/Css...topic interested in Issues.
0 stars 0 forks source link

#HTTP get #48

Open yeecai opened 2 years ago

yeecai commented 2 years ago

记录一次get带数组的

后端用 Java.util.List 接收

不能直接传 qs.stringify 类型是string,会报错

解决办法

用groupIds = qs.stringify({ groupIds: group }, { arrayFormat: "repeat" }) 得到groupIds = groupIds=0&groupIds=1,然后直接url: url/?${groupIds}

https://juejin.cn/post/6860724669062840327