MCPcopy
hub / github.com/Tencent/vConsole / getSetRequestHeader

Method getSetRequestHeader

src/network/xhr.proxy.ts:129–139  ·  view source on GitHub ↗
(target: T)

Source from the content-addressed store, hash-verified

127 }
128
129 protected getSetRequestHeader(target: T) {
130 const targetFunction = Reflect.get(target, 'setRequestHeader');
131 return (...args) => {
132 if (!this.item.requestHeader) {
133 this.item.requestHeader = {};
134 }
135 this.item.requestHeader[args[0]] = args[1];
136 this.triggerUpdate();
137 return targetFunction.apply(target, args);
138 };
139 }
140
141 protected setOnReadyStateChange(target: T, key: string, value) {
142 return Reflect.set(target, key, (...args) => {

Callers 1

getMethod · 0.95

Calls 3

triggerUpdateMethod · 0.95
getMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected