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

Function makeRequest

test/parallel/test-http-keep-alive-timeout-race-condition.js:6–17  ·  view source on GitHub ↗
(port, agent)

Source from the content-addressed store, hash-verified

4const http = require('http');
5
6const makeRequest = (port, agent) =>
7 new Promise((resolve, reject) => {
8 const req = http.get(
9 { path: '/', port, agent },
10 (res) => {
11 res.resume();
12 res.on('end', () => resolve());
13 },
14 );
15 req.on('error', (e) => reject(e));
16 req.end();
17 });
18
19const server = http.createServer(
20 { keepAliveTimeout: common.platformTimeout(2000), keepAlive: true },

Calls 6

getMethod · 0.65
resumeMethod · 0.65
resolveFunction · 0.50
rejectFunction · 0.50
onMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…