0
在我的react-native应用程序中,我正在尝试使用body
进行提取请求。但是,我收到了unexpected EOF
的错误消息。实际上,请求已发出,我的意思是我可以通过后端日志查看发送的请求,而在请求之后,它会显示错误消息。react-native fetch - 请求正文 - 意外的EOF
这是我的fetch
方法。
var Url = "https://----------";
return fetch(Url, {
method: "POST",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({'number': '11111111-'})
})
.then((response) => response.json())
.then((responseJson) => {
console.log("SEND_SMS RESULT: ",responseJson);
})
.done();
这里是我得到的错误屏幕。