|
Last change
on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
255 bytes
|
| Line | |
|---|
| 1 | function responseArrayBuffer(response) {
|
|---|
| 2 | if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
|---|
| 3 | return response.arrayBuffer();
|
|---|
| 4 | }
|
|---|
| 5 |
|
|---|
| 6 | export default function(input, init) {
|
|---|
| 7 | return fetch(input, init).then(responseArrayBuffer);
|
|---|
| 8 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.