My code is
const axios = require('axios')const https = require('https');const axiosCookieJarSupport = require("axios-cookiejar-support");const tough = require("tough-cookie");const HEADERS = {'Content-Type': 'application/json; odata.streaming=true; charset=utf-8', Accept: 'application/json; odata.metadata=none, text/plain','TM1-SessionContext': '----','User-Agent': '----' }this.http = axios.create({ headers: HEADERS, withCredentials: true, httpsAgent: new https.Agent({ rejectUnauthorized: false })})axiosCookieJarSupport.wrapper(this.http)this.http.defaults.jar = new tough.CookieJar()this.http.defaults.baseURL = this.baseUrl// Then other things but that doesn't matterBut when i run that i got this error :
Error: axios-cookiejar-support does not support for use with other http(s).Agent. at requestInterceptor (C:\node_modules\axios-cookiejar-support\dist\index.js:14:15) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RestService.startSession (C:\main.js:109:29)I guess the problem come from the https agent initialized with https.Agent({})
Maybe it exist the same constructor from axios lib but i didn't find it
Thanks by advance