前端代码const api = "http://localhost:8080/index.do"const headers = { 'Content-Type': 'text/plain', 'Access-Control-Allow-Origin':'*'}const num=0getCourses = (num) => fetch(`${api}`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, mode: 'cors', body: JSON.stringify({ num }) }).then(res => res.json()) .then(data => data)getCourses(num)后端代码为何后端总是接受不到请求的参数,Required String parameter 'num' is not present,各位大神帮忙解决一下啊
添加回答
举报
0/150
提交
取消