我虽然用JSON.stringify()转化了。
但接口状态码200,返回的信息提示:Content type ‘application/x-www-form-urlencoded;charset=UTF-8’ not supported。
我百度有人说是格式不对。于是我在请求方法里添加Content-Type如下。
url: url,
method:‘post’ ,
data: parameter,
headers: {
‘Content-Type’: ‘application/json’,
},
即成功了。