首页 新闻 会员 周边

fetch 怎么传递数组参数?

0
[待解决问题]

fetch(
"请求地址",
{
method:'POST',
headers: {
"Content-Type": "application/json"
},
body:new Array("59fc72e384aee8b82df5e614","59fc72e384aee8b82df5e615")
}
).then((res)=>{
if(res.ok){
res.text().then((data)=>{
console.log(data)
})
}
}).catch((res)=>{
console.log(res);
});

 

body 这里想传递一个数组该怎么写呢?

sdns的主页 sdns | 初学一级 | 园豆:1
提问于:2018-04-01 09:42
< >
分享
所有回答(1)
0
hehe_54321 | 园豆:750 (小虾三级) | 2018-04-02 19:04
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册