mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
perf: http请求增加默认超时时间
This commit is contained in:
@@ -46,6 +46,9 @@ export function createAxiosService({ logger }: { logger: Logger }) {
|
||||
service.interceptors.request.use(
|
||||
(config: any) => {
|
||||
logger.info(`http request:${config.url},method:${config.method},params:${JSON.stringify(config.params)}`);
|
||||
if (config.timeout == null) {
|
||||
config.timeout = 10000;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(error: Error) => {
|
||||
|
||||
Reference in New Issue
Block a user