MCPcopy Index your code
hub / github.com/nodejs/node / request

Function request

test/parallel/test-http-client-agent.js:55–71  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

53}));
54
55function request(i) {
56 const req = http.get({
57 port: server.address().port,
58 path: `/${i}`,
59 agent
60 }, common.mustCall((res) => {
61 const socket = req.socket;
62 socket.on('close', common.mustCall(() => {
63 countdown.dec();
64 if (countdown.remaining > 0) {
65 assert.strictEqual(agent.sockets[name].includes(socket),
66 false);
67 }
68 }));
69 res.resume();
70 }));
71}

Calls 6

decMethod · 0.80
includesMethod · 0.80
getMethod · 0.65
addressMethod · 0.65
resumeMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…