mirror of
https://github.com/certd/certd.git
synced 2026-05-17 22:07:34 +08:00
chore: 1
This commit is contained in:
@@ -111,8 +111,13 @@ export function createAxiosService({ logger }: { logger: ILogger }) {
|
|||||||
if (config.logData == null) {
|
if (config.logData == null) {
|
||||||
config.logData = false;
|
config.logData = false;
|
||||||
}
|
}
|
||||||
|
if (config.logReq == null) {
|
||||||
|
config.logReq = true;
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(`http request:${config.url},method:${config.method}`);
|
if (config.logReq !== false) {
|
||||||
|
logger.info(`http request:${config.url},method:${config.method}`);
|
||||||
|
}
|
||||||
if (config.logParams !== false && config.params) {
|
if (config.logParams !== false && config.params) {
|
||||||
logger.info(`params:${JSON.stringify(config.params)}`);
|
logger.info(`params:${JSON.stringify(config.params)}`);
|
||||||
}
|
}
|
||||||
@@ -301,6 +306,7 @@ export type HttpClientResponse<R> = any;
|
|||||||
export type HttpRequestConfig<D = any> = {
|
export type HttpRequestConfig<D = any> = {
|
||||||
skipSslVerify?: boolean;
|
skipSslVerify?: boolean;
|
||||||
skipCheckRes?: boolean;
|
skipCheckRes?: boolean;
|
||||||
|
logReq?: boolean;
|
||||||
logParams?: boolean;
|
logParams?: boolean;
|
||||||
logRes?: boolean;
|
logRes?: boolean;
|
||||||
logData?: boolean;
|
logData?: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user