(options)
| 5 | const { createProxyAgent } = require('../lib/proxy-agent') |
| 6 | |
| 7 | function fetch (options) { |
| 8 | const rp = require('axios') |
| 9 | rp.defaults.proxy = false |
| 10 | return rp(options) |
| 11 | .then((res) => { |
| 12 | return res.data |
| 13 | }) |
| 14 | .catch(error => { |
| 15 | return { |
| 16 | error |
| 17 | } |
| 18 | }) |
| 19 | } |
| 20 | |
| 21 | async function wsFetchHandler (ws, msg) { |
| 22 | const { id, options, proxy } = msg |
no test coverage detected