1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-10 05:40:06 +00:00

test(RequestClient): specs for communicating with self-signed server

This commit is contained in:
Saad Jutt
2021-10-01 12:03:44 +05:00
parent f0ecfa57e5
commit e975e7de97
4 changed files with 210 additions and 2 deletions

View File

@@ -527,9 +527,12 @@ export class RequestClient implements HttpClient {
? { rejectUnauthorized: !allowInsecure }
: undefined
if (httpsAgentConfig) {
if (httpsAgentConfig && https.Agent) {
const httpsAgent = new https.Agent(httpsAgentConfig)
this.httpClient = axios.create({ httpsAgent })
this.httpClient = axios.create({
baseURL: baseUrl,
httpsAgent
})
} else {
this.httpClient = axios.create({
baseURL: baseUrl