From 9f1c708302c8b7ecf229c775387731b8bbfa3bd8 Mon Sep 17 00:00:00 2001 From: Remco Mokveld Date: Thu, 13 Mar 2025 10:46:35 +0100 Subject: [PATCH] Specify requestOptions in constructor of HttpClient --- sources/src/develocity/short-lived-token.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sources/src/develocity/short-lived-token.ts b/sources/src/develocity/short-lived-token.ts index 4f34878d..14a05f33 100644 --- a/sources/src/develocity/short-lived-token.ts +++ b/sources/src/develocity/short-lived-token.ts @@ -80,12 +80,9 @@ class ShortLivedTokenClient { retryInterval = 1000 constructor(develocityAllowUntrustedServer: boolean | undefined) { - this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle') - if (develocityAllowUntrustedServer !== undefined) { - this.httpc.requestOptions = { - ignoreSslError: develocityAllowUntrustedServer - } - } + this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle', undefined, { + ignoreSslError: develocityAllowUntrustedServer + }) } async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise {