MCPcopy
hub / github.com/di-sukharev/opencommit / req

Function req

out/cli.cjs:25919–25927  ·  view source on GitHub ↗
(url2, opts = {})

Source from the content-addressed store, hash-verified

25917 }
25918 exports2.json = json;
25919 function req(url2, opts = {}) {
25920 const href = typeof url2 === "string" ? url2 : url2.href;
25921 const req2 = (href.startsWith("https:") ? https3 : http4).request(url2, opts);
25922 const promise = new Promise((resolve, reject) => {
25923 req2.once("response", resolve).once("error", reject).end();
25924 });
25925 req2.then = promise.then.bind(promise);
25926 return req2;
25927 }
25928 exports2.req = req;
25929 }
25930});

Callers

nothing calls this directly

Calls 4

startsWithMethod · 0.80
endMethod · 0.80
requestMethod · 0.45
onceMethod · 0.45

Tested by

no test coverage detected