MCPcopy Create free account
hub / github.com/Semporia/Scripts / send

Method send

jd_try.js:522–536  ·  view source on GitHub ↗
(opts, method = 'GET')

Source from the content-addressed store, hash-verified

520 }
521
522 send(opts, method = 'GET') {
523 opts = typeof opts === 'string' ? {
524 url: opts
525 } : opts
526 let sender = this.get
527 if (method === 'POST') {
528 sender = this.post
529 }
530 return new Promise((resolve, reject) => {
531 sender.call(this, opts, (err, resp, body) => {
532 if (err) reject(err)
533 else resolve(resp)
534 })
535 })
536 }
537
538 get(opts) {
539 return this.send.call(this.env, opts)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected