You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
255 B

1 year ago
​
​
​
​
​
​
​
  1. function responseArrayBuffer(response) {
  2. if (!response.ok) throw new Error(response.status + " " + response.statusText);
  3. return response.arrayBuffer();
  4. }
  5. export default function(input, init) {
  6. return fetch(input, init).then(responseArrayBuffer);
  7. }