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

Function makeRequest

test/parallel/test-pipe-file-to-http.js:66–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64});
65
66function makeRequest() {
67 const req = http.request({
68 port: server.address().port,
69 path: '/',
70 method: 'POST'
71 });
72
73 const s = fs.ReadStream(filename);
74 s.pipe(req);
75 s.on('close', common.mustSucceed());
76
77 req.on('response', (res) => {
78 res.resume();
79 res.on('end', () => {
80 server.close();
81 });
82 });
83}
84
85process.on('exit', () => {
86 assert.strictEqual(count, 1024 * 10240);

Callers 2

Calls 5

requestMethod · 0.65
addressMethod · 0.65
resumeMethod · 0.65
closeMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…