MCPcopy Index your code
hub / github.com/loopbackio/loopback-next / httpsGetAsync

Function httpsGetAsync

packages/testlab/src/request.ts:29–45  ·  view source on GitHub ↗
(
  urlString: string,
  agent?: https.Agent,
)

Source from the content-addressed store, hash-verified

27 * @param urlString
28 */
29export function httpsGetAsync(
30 urlString: string,
31 agent?: https.Agent,
32): Promise<IncomingMessage> {
33 agent =
34 agent ??
35 new https.Agent({
36 rejectUnauthorized: false,
37 });
38
39 const urlOptions = url.parse(urlString);
40 const options = {agent, ...urlOptions};
41
42 return new Promise((resolve, reject) => {
43 https.get(options, resolve).on('error', reject);
44 });
45}

Calls 3

parseMethod · 0.65
getMethod · 0.65
onMethod · 0.45

Tested by

no test coverage detected