title: React Native Fetch API - can't access json or body of response
body: <p>Trying to call an API to my backend with Fetch, but I can't access the response body. There's a loot of different notation and syntax about this on the internet and I can't figure out how to do it properly. </p>
  
  <p>I've tried response.json() and responseJson, and stringyfying both. I don't get what I want which is the actual body of the response. It's meant to have a key/token that I then save. </p>
  
  <p>responseJson returns this: responseJson: </p>
  
  <pre><code>{"_40":0,"_65":0,"_55":null,"_72":null}
  </code></pre>
  
  <p>This is my function: </p>
  
  <pre><code>export function LogIn(em, pass) {
      return (dispatch) =&gt; {
  
          console.log('LogIn called');
          dispatch(logInIsLoading(true));
          //from phone
          *fetch('http://192.168.1.18:8080/rest-auth/login/', {
            method: 'POST',
            headers: {
              // 'Accept': 'application/json',
              'Content-Type': 'application/json',
            },
            body: JSON.stringify({
              'email': em,
              'password': pass,
            })
          }).then((response) =&gt; {
                  console.log("response " + JSON.stringify(response));
                  if (!response.ok) {
                      console.log("ERROR: " + response.statusText);
                      throw Error(response.statusText);
                  }
  
                  dispatch(logInIsLoading(false));
  
                  return response;
              })
              .then((response) =&gt; {
                responseJson = response.json();
                console.log("responseJson: " + JSON.stringify(response.json()));
  
                return responseJson
              })
              .then((responseJson) =&gt; {
  
                AsyncStorage.multiSet([['key', responseJson.key], ['loggedIn', true]], () =&gt; {
                      console.log(responseJson.key);
                      dispatch(isLoggedIn(true));
                      dispatch(getKey(responseJson.key));
  
                  });
  
  
              })*
              .catch(() =&gt; dispatch(logInHasErrored(true)));
      };
  }
  </code></pre>
  
  <p>This is the response, but I can't get to the key in the body: </p>
  
  <pre><code>response {"type":"default","status":200,"ok":true,"headers":{"map":
  {"allow":["POST, OPTIONS"],"set-cookie":
  ["csrftoken=DOMxD5IhNz5Vwm9a3niAR1tRyqBfNzUqnQMAEgk7AGwtwCgnRnZo9x0AMTM2IfK
  q; expires=Fri, 22-Feb-2019 17:31:58 GMT; Max-Age=31449600; Path=/, 
  sessionid=er3fujv8ji96t41n1n8dlzb3zz1itwuj; expires=Fri, 09-Mar-2018 
  17:31:58 GMT; httponly; Max-Age=1209600; Path=/"],"content-type":
  ["application/json"],"content-length":["50"],"x-frame-options":
  ["SAMEORIGIN"],"vary":["Accept, Cookie"],"server":["WSGIServer/0.1 
  Python/2.7.14"],"date":["Fri, 23 Feb 2018 17:31:58 
  GMT"]}},"url":"http://192.168.1.18:8080/rest-auth/login/","_bodyInit":"
  {\"key\":\"a9951fd6abff4fed35d9a8d1c275bf1212887513\"}","_bodyText":"
  {\"key\":\"a9951fd6abff4fed35d9a8d1c275bf1212887513\"}"}
  </code></pre>