()
| 24 | } |
| 25 | |
| 26 | async read() { |
| 27 | try { |
| 28 | let res = await got(this.url, { |
| 29 | method: 'GET', |
| 30 | headers: { |
| 31 | Accept: 'application/json;q=0.9,text/plain', |
| 32 | }, |
| 33 | ...this.fetchOptions, |
| 34 | }) |
| 35 | if (res.statusCode !== 200) throw res.statusMessage |
| 36 | return this.deserialize(res.body) |
| 37 | } catch (e) { |
| 38 | return null |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | async write(obj) { |
| 43 | let res = await got(this.url, { |
nothing calls this directly
no outgoing calls
no test coverage detected