MCPcopy Create free account
hub / github.com/Maccoder3/MAC-MD / read

Method read

lib/cloudDBAdapter.js:26–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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, {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected