MCPcopy
hub / github.com/electerm/electerm / fetch

Function fetch

src/app/server/fetch.js:7–19  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

5const { createProxyAgent } = require('../lib/proxy-agent')
6
7function 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
21async function wsFetchHandler (ws, msg) {
22 const { id, options, proxy } = msg

Callers 13

createTermFunction · 0.85
runCmdFunction · 0.85
resizeTermFunction · 0.85
toggleTerminalLogFunction · 0.85
setTerminalLogPathFunction · 0.85
startTerminalLogFileFunction · 0.85
fetchDataFunction · 0.85
fetchDataFunction · 0.85
fs.jsFile · 0.85
test-connection.jsFile · 0.85
initWsFunction · 0.85

Calls 1

requireFunction · 0.85

Tested by

no test coverage detected