How to use the blob function from cross-fetch

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

61
62
63
64
65
66
67
68
69
70
    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
  }
} catch(err) {
fork icon0
star icon0
watch icon2