Specify requestOptions in constructor of HttpClient

This commit is contained in:
Remco Mokveld 2025-03-13 10:46:35 +01:00
parent 34dcae18f8
commit 9f1c708302

View File

@ -80,12 +80,9 @@ class ShortLivedTokenClient {
retryInterval = 1000 retryInterval = 1000
constructor(develocityAllowUntrustedServer: boolean | undefined) { constructor(develocityAllowUntrustedServer: boolean | undefined) {
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle') this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle', undefined, {
if (develocityAllowUntrustedServer !== undefined) { ignoreSslError: develocityAllowUntrustedServer
this.httpc.requestOptions = { })
ignoreSslError: develocityAllowUntrustedServer
}
}
} }
async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> { async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> {