(opts, method = 'GET')
| 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) |
nothing calls this directly
no outgoing calls
no test coverage detected