fetch("http://127.0.0.1:8081/tow").then(function (e) { return e.text() }).then(function (e) { console.log(JSON.parse(e)) });
fetch("http://127.0.0.1:8081/tow", {
method: "post",
headers: {
"Accept": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "zs",
age: 18
})
}).then(function (e) { return e.text() }).then(function (e) { console.log(JSON.parse(e)) });