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
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<HostnameAccessKey> {