Skip to content

Commit

Permalink
Use https module
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Oct 10, 2024
1 parent 79e826e commit d70300d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/tools-download.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tools-download.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/tools-download.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as http from "http";
import { OutgoingHttpHeaders } from "http";
import { IncomingMessage, OutgoingHttpHeaders } from "http";
import * as https from "https";
import * as path from "path";
import { performance } from "perf_hooks";

Expand Down Expand Up @@ -145,8 +145,8 @@ async function downloadAndExtractZstdWithStreaming(
{ "User-Agent": "CodeQL Action", authorization },
headers,
);
const response = await new Promise<http.IncomingMessage>((resolve) =>
http.get(codeqlURL, { headers }, (r) => resolve(r)),
const response = await new Promise<IncomingMessage>((resolve) =>
https.get(codeqlURL, { headers }, (r) => resolve(r)),
);

if (response.statusCode !== 200) {
Expand Down

0 comments on commit d70300d

Please sign in to comment.