MCPcopy Create free account
hub / github.com/nodejs/node / setResponseHeaders

Function setResponseHeaders

test/parallel/test-inspector-network-http.js:25–31  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

23};
24
25const setResponseHeaders = (res) => {
26 res.setHeader('server', 'node');
27 res.setHeader('etag', 12345);
28 res.setHeader('Set-Cookie', ['key1=value1', 'key2=value2']);
29 res.setHeader('x-header2', ['value1', 'value2']);
30 res.setHeader('Content-Type', 'text/plain; charset=utf-8');
31};
32
33const kTimeout = 1000;
34const kDelta = 200;

Callers 3

handleRequestFunction · 0.70
fromInnerResponseFunction · 0.50
fromInnerResponseFunction · 0.50

Calls 1

setHeaderMethod · 0.80

Tested by

no test coverage detected