How to use the json function from cross-fetch

Find comprehensive JavaScript cross-fetch.json code examples handpicked from public code repositorys.

59
60
61
62
63
64
65
66
67
68
    'tryal-application-token': '<tryal-app-token>' // Your App Token goes here
  },
  body: JSON.stringify(body) //The body of the request
});
if (response.status == 200) {
  return await fetch.json();
  //or
  return await fetch.blob(); // for PDFs
} else {
  throw REQUEST_ERROR
fork icon0
star icon0
watch icon2