title: Unhandled Rejection -SyntaxError- Unexpected end of JSON input
body: <p>My JSX file returns the API data when accessed from myjson.com; but when I attempt to access the data from the <strong>provided URL</strong> for the API, I get an "Unhandled Rejection -SyntaxError- Unexpected end of JSON input" error.
  <strong>The provided</strong> URL, when placed into Postman, returns data via GET when a Bearer Token is provided. </p>
  
  <p>My question: does that same token have to be implemented within my JSX file in order to access the data for the API and if so, how is that implemented within the code?</p>
  
  <p>This is my Code (modified):</p>
  
  <pre><code>import React, { Component } from 'react';
  import {render} from "react-dom";
  import Navbar from '../components/Navbar.jsx';
  import Footer from '../components/Footer.jsx';
  import './MemberInfo.css';
  
  class MemberInfo extends Component {
  
      state = { data: [] }
  
      componentWillMount(){
          fetch('http://myjson.com/api/e312j/', {
              method: 'GET',
              headers: {
                  'Accept': 'application/json',
                  'Content-type': 'application/json',
                  'Authorization': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiR3JlZyIsInVuaXF1ZV9uYW1lIjoiZ2dyYWZmIiwibmJmIjoxNTI0ODM5Nzc1LCJleHAiOjE1MjQ5MjYxNzV9.xhvdfaWkLVZ_HLwYQuPet_2vlxNF7AoYgX-XRufiOj0'
              },
          }
  
  
          ) /*end fetch */
          .then(results =&gt; results.json()) 
          .then(data =&gt; this.setState({ data: data }))   
        }
  
      render() {
          console.log(this.state.data);
          return (
              &lt;div&gt;
                  &lt;Navbar /&gt;
                  &lt;div className="container"&gt;
                       &lt;div className="clientContainer"&gt;
                              {
                                  this.state.data.map( item =&gt;( 
                                  &lt;div&gt;
                                      {item.clientName}
                                  &lt;/div&gt;
                                  ))
                              }
                          &lt;/div&gt; 
              &lt;/div&gt; 
              &lt;Footer /&gt; 
            &lt;/div&gt;
          );
        }
  }
  
  export default MemberInfo;
  </code></pre>
  
  <p>I'm still new when it comes to using ReactJS to fetch API data; could I get some help with this please?</p>