// @ts-nocheck import Agent, { HttpsAgent } from 'agentkeepalive'; import { HttpClient2 } from 'urllib'; import { noop } from 'lodash'; export default function getHttpClient() { const client = new HttpClient2({ defaultArgs: { timeout: 5000, }, agent: new Agent({ keepAlive: true, freeSocketTimeout: 4000, maxSockets: Number.MAX_SAFE_INTEGER, maxFreeSockets: 256, }), httpsAgent: new HttpsAgent({ keepAlive: true, freeSocketTimeout: 4000, maxSockets: Number.MAX_SAFE_INTEGER, maxFreeSockets: 256, }), }); client.onResponse = noop; return client; }