title: Uncaught (in promise) SyntaxError: Unexpected end of JSON input Promise.then (async)
body: <p>I am trying to add data to my database. Upon execution of my fetch method I receive the following error</p>
  
  <p>Uncaught (in promise) SyntaxError: Unexpected end of JSON input Promise.then (async)</p>
  
  <p>I have tried re-configuring the promise but am unsure if I am doing this correctly. </p>
  
  <pre><code>addNewBeer() {
      fetch("https://beer.fluentcloud.com/v1/beer/", {
        body: "{\"name\":\"\",\"likes\":\"\"}",//input beer name and like amount ex "{\"name\":\"Michelob Ultra\",\"likes\":\"-5\"}"
        headers: {
          "Content-Type": "application/json"
        },
        method: "POST"
        })
        .then(response =&gt; response.json())
        .then(responseJson =&gt; {
          this.setState({
            isLoaded: true,
            dataSource: this.state.dataSource + responseJson,
        });
      })
    }
  </code></pre>