浏览器,F12打开Console控制台,输入:
fetch('http://localhost:8080/export', { 'method': 'POST', 'headers': {'appId': 4}, 'body': 'name=yzh&age=18' })
即可在Network页看到发送的请求。
or
fetch('http://localhost:8080/export', { 'method': 'POST', 'headers': {'appId': 4}, 'body': 'name=yzh&age=18' }).then((resp)=>{console.log(resp)})
直接可在Console看到响应结果.