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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user