今天使用fetch调接口,发现只有一个options预请求,没有后续的post请求,代码如下
fetch('http://sci.hoptest.haier.net:9900/haierbpm/operation/bpm/ws/history',
{
body:{ instanceId },
headers: {
'locale': 'en_US',
'content-type': 'application/json',
},
method: 'POST'
}
).then(res => {
console.log(res)
})
现象如下
第一次用fetch实际调接口,请教这是啥问题
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…