这是我的功能
不知道问题出在哪里阵营原生取“POST”请求投掷“语法错误:JSON输入意外结束”,在Android的
fetchData() {
fetch(REQUEST_URL, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
Request : 'menu',
active : '1',
})
}).then((response) => response.json())
.then((responseData) => {
this.setState({
menu: responseData.Response,
});
})
.catch((error) => {
console.warn('error',error);
})
.done();
}
请指出问题在功能
任何一个有一些想法? –