12 lines
311 B
TypeScript
12 lines
311 B
TypeScript
import axios from 'axios';
|
|
import * as http from 'http';
|
|
import * as https from 'https';
|
|
|
|
const httpClient = axios.create({
|
|
timeout: 10_000,
|
|
httpAgent: new http.Agent({ keepAlive: true, maxSockets: 20 }),
|
|
httpsAgent: new https.Agent({ keepAlive: true, maxSockets: 20 }),
|
|
});
|
|
|
|
export default httpClient;
|