在浏览器控制台发送http请求

fetch("http://localhost:8010/api/UserConfig/GetUsers",{"method":"GET","body":null,"headers":{"authorization":"Basic " + btoa(JSON.stringify({"li":"administrator","pd":"superadmin"}))}}).then(response=>response.json()).then(data=>{console.log(data)}).catch(e=>{console.log(e)})

猜你喜欢

转载自www.cnblogs.com/BH-RJ-WK/p/12893590.html