MCPcopy
hub / github.com/wuchangming/spy-debugger / ignoreResponse

Method ignoreResponse

src/proxy/SpyProxy.js:85–97  ·  view source on GitHub ↗
(req, res, proxyRes)

Source from the content-addressed store, hash-verified

83 });
84 }
85 ignoreResponse(req, res, proxyRes) {
86 Object.keys(proxyRes.headers).forEach(function(key) {
87 if(proxyRes.headers[key] != undefined){
88 var newkey = key.replace(/^[a-z]|-[a-z]/g, (match) => {
89 return match.toUpperCase()
90 });
91 var newkey = key;
92 res.setHeader(newkey, proxyRes.headers[key]);
93 }
94 });
95 res.writeHead(proxyRes.statusCode);
96 proxyRes.pipe(res);
97 }
98 interceptResponse(req, res, proxyRes) {
99 var _this = this;
100 var isHtml = httpUtil.isHtml(proxyRes);

Callers 2

interceptResponseMethod · 0.95
SpyProxy.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected