反应本地发布请求错误ERROR,函数响应附近错误

时间:2018-07-04 16:00:02

标签: reactjs react-native redux fetch redux-thunk

在React Native中发出POST请求时,出现以下错误。

这是我的代码:

 releaseTable(sId,itemId,callback){
     return fetch('url', {
         method: 'POST',
         header:{
             Accept:'application/json',
             'Content-Type': 'application/json',
         },
         body:JSON.stringify({
            SessionID:sId,
            ListID:itemId
         })
         .then((response)=> response.json())    
         .then((responseJson) => {
             callback(responseJson)
         })
         .catch((error) => {
             console.error(error);
         })
     })
 }

0 个答案:

没有答案
相关问题