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

Function post

test/parallel/test-inspector-connect-main-thread.js:25–38  ·  view source on GitHub ↗
(session, method, params)

Source from the content-addressed store, hash-verified

23const messagesSent = [];
24
25async function post(session, method, params) {
26 return new Promise((resolve, reject) => {
27 session.post(method, params, (error, success) => {
28 messagesSent.push(method);
29 if (error) {
30 process._rawDebug(`Message ${method} produced an error`);
31 reject(error);
32 } else {
33 process._rawDebug(`Message ${method} was sent`);
34 resolve(success);
35 }
36 });
37 });
38}
39
40async function waitForNotification(session, notification) {
41 return new Promise((resolve) => session.once(notification, resolve));

Callers 2

childMainFunction · 0.70
skipChildMainFunction · 0.70

Calls 4

rejectFunction · 0.50
resolveFunction · 0.50
postMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…