反应原生提取不发送正文内容

问题描述:

我是新来取回反应原生和跟随this tutorial
我想发送一个json主体到一个私人api服务器,我检查了服务器日志,发现主体内容是空的。反应原生提取不发送正文内容

下面是代码在本地反应

authenticateLogIn(){ 
    fetch('<URL>', { 
      method: 'POST', 
      header: {'Content-Type': 'application/json', 'Accept': 'application/json'}, 
      body: JSON.stringify({'username': '<username>', 'password':'<password>'}) 
     }) 
     .then((incoming) => incoming.json()) 
     .then((response) => { 
      console.log(response.header); 
      Alert.alert(JSON.stringify(response.body)); 
     }) 
     .done(); 

也许是因为它shoueld是头小号? (与s)

+0

啊,就是这样,一直以为它只是一个头不是没有S – XPLOT1ON