Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react native fetch response code

function processResponse(response) {
  const statusCode = response.status;
  const data = response.json();
  return Promise.all([statusCode, data]).then(res => ({
    statusCode: res[0],
    data: res[1]
  }));
}
 
PREVIOUS NEXT
Tagged: #react #native #fetch #response #code
ADD COMMENT
Topic
Name
8+8 =