【发布时间】:2018-05-07 04:39:51
【问题描述】:
我通过 api 将数据发送到服务器。但我在响应时收到错误消息。
下面是我的代码
fetch('http://35.196.195.208/SaveRecommendAppDetails', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
UserId:"23",
ClientId:"2",
Name: "Paras",
Email: "Paras@gmail.com",
Phone: "9876543210",
CreatedUserId:"23" ,
Company: "Brill Infosystem"})
})
.then((response) =>JSON.stringify(response.json()))
.then((responseJson) =>{console.log( "==========response=========" + responseJson) })
.catch((err) => { console.log("==========error=========" + err); });
}
错误是: { "_40":0,"_65":0,"_55":null,"_72":null }
【问题讨论】:
标签: reactjs react-native fetch fetch-api