作者:可可1994棒_241 | 来源:互联网 | 2022-12-02 17:52
我是新来反应js的人,请参阅下面我的post API调用中的react
updateData = datas => {
axios
.post("http://localhost:8080/ReactAPI/post.php", datas)
.then(function(body) {
console.log(body);
})
.catch(function(error) {
console.log(error);
});
}
和PHP文件post.php代码如下:
控制台,我给响应正文,如下所示:
{data: "Array?(?)?", status: 200, statusText: "OK", headers: {…}, config: {…}, …}
我通过datas
下面给我方面作为回应
{id: "41", userId: "3672367892", fullName: "Subhash Patel"}
请在这里帮助我,如何datas
在post.php文件中接收响应