获取:POST json数据
fetch("/echo/json/",{
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: "POST",
body: JSON.stringify({a: 1, b: 2})}).then(function(res){ console.log(res) }).catch(function(res){ console.log(res) }){a: 1, b: 2}
PIPIONE
慕桂英4014372
随时随地看视频慕课网APP
相关分类