1. 首页 > 快讯

js获取post数据(javascript postmessage)


function newPlayer(newForm) {
  fetch("http://localhost:3000/Players", {
      method:  "POST",
      headers: {
        'Content-Type': 'application/json'
      },
      body:JSON.stringify(newForm)
    })
  .then(resp => resp.json())
//   .then(player => console.log(player))
.then(player => showPlayer(player))
}

function showPlayer (player) {
    console.log(player)``
登录后复制

我经常提醒自己,并不是所有的信息都需要重构。我目前参加了一个训练营,知道吸收大量信息是多么困难,也知道管理时间以防止不知所措是多么困难。我希望本指南可以帮助您更好地理解 post 请求,并且简单明了,感谢您的阅读!

本文采摘于网络,不代表本站立场,转载联系作者并注明出处:https://www.iotsj.com//kuaixun/5169.html

联系我们

在线咨询:点击这里给我发消息

微信号:666666