* Determine whether this is an `http` or `https` request.
(options)
| 25979 | * Determine whether this is an `http` or `https` request. |
| 25980 | */ |
| 25981 | isSecureEndpoint(options) { |
| 25982 | if (options) { |
| 25983 | if (typeof options.secureEndpoint === "boolean") { |
| 25984 | return options.secureEndpoint; |
| 25985 | } |
| 25986 | if (typeof options.protocol === "string") { |
| 25987 | return options.protocol === "https:"; |
| 25988 | } |
| 25989 | } |
| 25990 | const { stack } = new Error(); |
| 25991 | if (typeof stack !== "string") |
| 25992 | return false; |
| 25993 | return stack.split("\n").some((l3) => l3.indexOf("(https.js:") !== -1 || l3.indexOf("node:https:") !== -1); |
| 25994 | } |
| 25995 | // In order to support async signatures in `connect()` and Node's native |
| 25996 | // connection pooling in `http.Agent`, the array of sockets for each origin |
| 25997 | // has to be updated synchronously. This is so the length of the array is |
no outgoing calls
no test coverage detected