MCPcopy Index your code
hub / github.com/didi/mpx / appendProxy

Method appendProxy

packages/fetch/src/xfetch.js:155–163  ·  view source on GitHub ↗
(proxyRules)

Source from the content-addressed store, hash-verified

153
154 // 向后追加代理规则
155 appendProxy (proxyRules) {
156 if (isNotEmptyArray(proxyRules)) {
157 this.proxyOptions = this.proxyOptions.concat(proxyRules)
158 } else if (isNotEmptyObject(proxyRules)) {
159 this.proxyOptions.push(proxyRules)
160 } else {
161 console.error('仅支持不为空的对象或数组')
162 }
163 }
164
165 checkProxy (config) {
166 return requestProxy(this.proxyOptions, config)

Callers

nothing calls this directly

Calls 4

isNotEmptyArrayFunction · 0.90
isNotEmptyObjectFunction · 0.90
pushMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected