(url)
| 18 | return JSON.parse(txt); |
| 19 | }); |
| 20 | const get = (url) => |
| 21 | fetch(url, { |
| 22 | headers: { Authorization: `Bearer ${API_KEY}` }, |
| 23 | }).then(async (r) => { |
| 24 | const txt = await r.text(); |
| 25 | if (r.status !== 200) |
| 26 | console.log( |
| 27 | `GET ${url} status=${r.status}, body=${txt.substring(0, 200)}`, |
| 28 | ); |
| 29 | return JSON.parse(txt); |
| 30 | }); |
| 31 | const del = (url) => |
| 32 | fetch(url, { |
| 33 | method: 'DELETE', |
no outgoing calls
no test coverage detected