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

XPL*_*1ON 4 react-native

我是新来的反应本机,并遵循本教程.
我正在尝试将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();
Run Code Online (Sandbox Code Playgroud)

小智 8

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