axios-logger
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -19,2 +19,3 @@ "use strict"; | ||
url: true, | ||
params: false, | ||
data: true, | ||
@@ -40,2 +41,2 @@ status: true, | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vY29uZmlnLnRzIl0sIm5hbWVzIjpbImdsb2JhbENvbmZpZyIsIm1ldGhvZCIsInVybCIsImRhdGEiLCJzdGF0dXMiLCJzdGF0dXNUZXh0IiwibG9nZ2VyIiwiY29uc29sZSIsImxvZyIsInByZWZpeFRleHQiLCJkYXRlRm9ybWF0IiwiaGVhZGVycyIsImdldEdsb2JhbENvbmZpZyIsInNldEdsb2JhbENvbmZpZyIsImNvbmZpZyIsImFzc2VtYmxlQnVpbGRDb25maWciXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7OztBQUVBLElBQUlBLFlBQXVDLEdBQUc7QUFDMUNDLEVBQUFBLE1BQU0sRUFBRSxJQURrQztBQUUxQ0MsRUFBQUEsR0FBRyxFQUFFLElBRnFDO0FBRzFDQyxFQUFBQSxJQUFJLEVBQUUsSUFIb0M7QUFJMUNDLEVBQUFBLE1BQU0sRUFBRSxJQUprQztBQUsxQ0MsRUFBQUEsVUFBVSxFQUFFLElBTDhCO0FBTTFDQyxFQUFBQSxNQUFNLEVBQUVDLE9BQU8sQ0FBQ0MsR0FOMEI7QUFPMUNDLEVBQUFBLFVBQVUsRUFBRSxPQVA4QjtBQVExQ0MsRUFBQUEsVUFBVSxFQUFFLEtBUjhCO0FBUzFDQyxFQUFBQSxPQUFPLEVBQUU7QUFUaUMsQ0FBOUM7O0FBWUEsU0FBU0MsZUFBVCxHQUEyQjtBQUN2QixTQUFPWixZQUFQO0FBQ0g7O0FBRUQsU0FBU2EsZUFBVCxDQUF5QkMsTUFBekIsRUFBa0Q7QUFDOUNkLEVBQUFBLFlBQVksbUNBQ0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ZpZyB8IFJlc3BvbnNlTG9nQ29uZmlnIHwgRXJyb3JMb2dDb25maWcpOiBSZXF1aXJlZDxHbG9iYWxMb2dDb25maWc+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi5nbG9iYWxDb25maWcsXG4gICAgICAgIC4uLmNvbmZpZyxcbiAgICB9O1xufVxuXG5leHBvcnQge1xuICAgIGdldEdsb2JhbENvbmZpZyxcbiAgICBzZXRHbG9iYWxDb25maWcsXG4gICAgYXNzZW1ibGVCdWlsZENvbmZpZyxcbn07XG4iXX0= |
@@ -14,3 +14,4 @@ import { GlobalLogConfig } from './types'; | ||
}): this; | ||
makeUrl(url?: string): this; | ||
makeUrl(url?: string, baseUrl?: string): this; | ||
makeParams(params?: object): this; | ||
makeMethod(method?: string): this; | ||
@@ -20,3 +21,8 @@ makeData(data: object): this; | ||
build(): string; | ||
/** | ||
* Helper imported from Axios library | ||
* @see https://github.com/axios/axios/blob/d99d5faac29899eba68ce671e6b3cbc9832e9ad8/lib/helpers/combineURLs.js | ||
* */ | ||
combineURLs(baseURL: string, relativeURL?: string): string; | ||
} | ||
export default StringBuilder; |
@@ -62,7 +62,16 @@ "use strict"; | ||
makeUrl(url) { | ||
if (this.config.url && url) this.printQueue.push(url); | ||
makeUrl(url, baseUrl) { | ||
if (this.config.url && url) { | ||
if (baseUrl) url = this.combineURLs(baseUrl, url); | ||
this.printQueue.push(url); | ||
} | ||
return this; | ||
} | ||
makeParams(params) { | ||
if (this.config.params && params) this.printQueue.push(JSON.stringify(params)); | ||
return this; | ||
} | ||
makeMethod(method) { | ||
@@ -74,3 +83,4 @@ if (this.config.method && method) this.printQueue.push(_chalk.default.yellow(method.toUpperCase())); | ||
makeData(data) { | ||
if (this.config.data && data) this.printQueue.push(JSON.stringify(data)); | ||
const str = typeof data === `string` ? data : JSON.stringify(data); | ||
if (this.config.data && data) this.printQueue.push(str); | ||
return this; | ||
@@ -87,3 +97,12 @@ } | ||
} | ||
/** | ||
* Helper imported from Axios library | ||
* @see https://github.com/axios/axios/blob/d99d5faac29899eba68ce671e6b3cbc9832e9ad8/lib/helpers/combineURLs.js | ||
* */ | ||
combineURLs(baseURL, relativeURL) { | ||
return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; | ||
} | ||
} | ||
@@ -93,2 +112,2 @@ | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vc3RyaW5nLWJ1aWxkZXIudHMiXSwibmFtZXMiOlsiU3RyaW5nQnVpbGRlciIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwicHJpbnRRdWV1ZSIsImZpbHRlcmVkSGVhZGVyTGlzdCIsIm1ha2VMb2dUeXBlV2l0aFByZWZpeCIsImxvZ1R5cGUiLCJwcmVmaXgiLCJwcmVmaXhUZXh0IiwicHVzaCIsImNoYWxrIiwiZ3JlZW4iLCJtYWtlRGF0ZUZvcm1hdCIsImRhdGUiLCJkYXRlRm9ybWF0IiwibWFrZUhlYWRlciIsImhlYWRlcnMiLCJoZWFkZXJNYXAiLCJrZXkiLCJpbmNsdWRlcyIsIkpTT04iLCJzdHJpbmdpZnkiLCJtYWtlVXJsIiwidXJsIiwibWFrZU1ldGhvZCIsIm1ldGhvZCIsInllbGxvdyIsInRvVXBwZXJDYXNlIiwibWFrZURhdGEiLCJkYXRhIiwibWFrZVN0YXR1cyIsInN0YXR1cyIsInN0YXR1c1RleHQiLCJidWlsZCIsImpvaW4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFFQTs7Ozs7O0FBRUEsTUFBTUEsYUFBTixDQUFvQjtBQUtoQkMsRUFBQUEsV0FBVyxDQUFDQyxNQUFELEVBQTBCO0FBQUE7O0FBQUE7O0FBQUE7O0FBQ2pDLFNBQUtBLE1BQUwsR0FBY0EsTUFBZDtBQUNBLFNBQUtDLFVBQUwsR0F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lLCB0aGlzLmNvbmZpZy5kYXRlRm9ybWF0IHx8ICdpc29EYXRlVGltZScpO1xuICAgICAgICAgICAgdGhpcy5wcmludFF1ZXVlLnB1c2goZGF0ZUZvcm1hdCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgbWFrZUhlYWRlcihoZWFkZXJzPzogeyBba2V5OnN0cmluZ10gOiB7dmFsdWU6c3RyaW5nfX0pIHtcbiAgICAgICAgaWYodGhpcy5jb25maWcuaGVhZGVycyAmJiBoZWFkZXJzKSB7XG4gICAgICAgICAgICBjb25zdCBoZWFkZXJNYXA6eyBba2V5OnN0cmluZ10gOiB7dmFsdWU6c3RyaW5nfX0gPSB7fTtcbiAgICAgICAgICAgIGZvcihsZXQga2V5IGluIGhlYWRlcnMpIHtcbiAgICAgICAgICAgICAgICBpZighdGhpcy5maWx0ZXJlZEhlYWRlckxpc3QuaW5jbHVkZXMoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICBoZWFkZXJNYXBba2V5XSA9IGhlYWRlcnNba2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMucHJpbnRRdWV1ZS5wdXNoKEpTT04uc3RyaW5naWZ5KGhlYWRlck1hcCkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VVcmwodXJsPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLnVybCAmJiB1cmwpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKHVybCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VNZXRob2QobWV0aG9kPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLm1ldGhvZCAmJiBtZXRob2QpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKGNoYWxrLnllbGxvdyhtZXRob2QudG9VcHBlckNhc2UoKSkpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBtYWtlRGF0YShkYXRhOiBvYmplY3QpIHtcbiAgICAgICAgaWYodGhpcy5jb25maWcuZGF0YSAmJiBkYXRhKSB0aGlzLnByaW50UXVldWUucHVzaChKU09OLnN0cmluZ2lmeShkYXRhKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VTdGF0dXMoc3RhdHVzPzogbnVtYmVyLCBzdGF0dXNUZXh0Pzogc3RyaW5nKSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLnN0YXR1cyAmJiB0aGlzLmNvbmZpZy5zdGF0dXNUZXh0ICYmIHN0YXR1cyAmJiBzdGF0dXNUZXh0KSB0aGlzLnByaW50UXVldWUucHVzaChgJHtzdGF0dXN9OiR7c3RhdHVzVGV4dH1gKTtcbiAgICAgICAgZWxzZSBpZih0aGlzLmNvbmZpZy5zdGF0dXMgJiYgc3RhdHVzKSB0aGlzLnByaW50UXVldWUucHVzaChgJHtzdGF0dXN9YCk7XG4gICAgICAgIGVsc2UgaWYodGhpcy5jb25maWcuc3RhdHVzVGV4dCAmJiBzdGF0dXNUZXh0KSB0aGlzLnByaW50UXVldWUucHVzaChzdGF0dXNUZXh0KTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgYnVpbGQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByaW50UXVldWUuam9pbignICcpO1xuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgU3RyaW5nQnVpbGRlcjtcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vc3RyaW5nLWJ1aWxkZXIudHMiXSwibmFtZXMiOlsiU3RyaW5nQnVpbGRlciIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwicHJpbnRRd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KSkge1xuICAgICAgICAgICAgICAgICAgICBoZWFkZXJNYXBba2V5XSA9IGhlYWRlcnNba2V5XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMucHJpbnRRdWV1ZS5wdXNoKEpTT04uc3RyaW5naWZ5KGhlYWRlck1hcCkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VVcmwodXJsPzogc3RyaW5nLCBiYXNlVXJsPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLnVybCAmJiB1cmwpIHtcbiAgICAgICAgICAgIGlmKGJhc2VVcmwpIHVybCA9IHRoaXMuY29tYmluZVVSTHMoYmFzZVVybCwgdXJsKTtcbiAgICAgICAgICAgIHRoaXMucHJpbnRRdWV1ZS5wdXNoKHVybCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgbWFrZVBhcmFtcyhwYXJhbXM/OiBvYmplY3QpIHtcbiAgICAgICAgaWYodGhpcy5jb25maWcucGFyYW1zICYmIHBhcmFtcykgdGhpcy5wcmludFF1ZXVlLnB1c2goSlNPTi5zdHJpbmdpZnkocGFyYW1zKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VNZXRob2QobWV0aG9kPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLm1ldGhvZCAmJiBtZXRob2QpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKGNoYWxrLnllbGxvdyhtZXRob2QudG9VcHBlckNhc2UoKSkpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBtYWtlRGF0YShkYXRhOiBvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RyID0gdHlwZW9mIGRhdGEgPT09IGBzdHJpbmdgID8gZGF0YSA6IEpTT04uc3RyaW5naWZ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cmVsYXRpdmVVUkxcbiAgICAgICAgICAgID8gYmFzZVVSTC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIHJlbGF0aXZlVVJMLnJlcGxhY2UoL15cXC8rLywgJycpXG4gICAgICAgICAgICA6IGJhc2VVUkw7XG4gICAgfTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgU3RyaW5nQnVpbGRlcjtcbiJdfQ== |
@@ -6,2 +6,3 @@ export interface CommonConfig { | ||
logger?: (text: string) => any; | ||
params?: boolean; | ||
} | ||
@@ -8,0 +9,0 @@ export interface GlobalLogConfig extends CommonConfig { |
import { AxiosError } from 'axios'; | ||
import { ErrorLogConfig } from '../common/types'; | ||
declare function errorLoggerWithoutPromise(error: AxiosError, config?: ErrorLogConfig): AxiosError; | ||
declare function errorLoggerWithoutPromise(error: AxiosError, config?: ErrorLogConfig): AxiosError<any>; | ||
declare function errorLogger(error: AxiosError, config?: ErrorLogConfig): Promise<never>; | ||
export { errorLogger, errorLoggerWithoutPromise }; |
@@ -19,2 +19,4 @@ "use strict"; | ||
method, | ||
baseURL, | ||
params, | ||
url | ||
@@ -35,3 +37,3 @@ }, | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Error').makeDateFormat(new Date()).makeMethod(method).makeUrl(url).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Error').makeDateFormat(new Date()).makeMethod(method).makeUrl(url, baseURL).makeParams(params).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
buildConfig.logger(log); | ||
@@ -44,2 +46,2 @@ return error; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvZXJyb3IudHMiXSwibmFtZXMiOlsiZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSIsImVycm9yIiwiY29uZmlnI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2VQYXJhbXMocGFyYW1zKVxuICAgICAgICAubWFrZVN0YXR1cyhzdGF0dXMsIHN0YXR1c1RleHQpXG4gICAgICAgIC5tYWtlSGVhZGVyKGhlYWRlcnMpXG4gICAgICAgIC5tYWtlRGF0YShkYXRhKVxuICAgICAgICAuYnVpbGQoKTtcblxuICAgIGJ1aWxkQ29uZmlnLmxvZ2dlcihsb2cpO1xuXG4gICAgcmV0dXJuIGVycm9yO1xufVxuXG5mdW5jdGlvbiBlcnJvckxvZ2dlcihlcnJvcjogQXhpb3NFcnJvciwgY29uZmlnPzogRXJyb3JMb2dDb25maWcpIHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZShlcnJvciwgY29uZmlnKSk7XG59XG5cbmV4cG9ydCB7IGVycm9yTG9nZ2VyLCBlcnJvckxvZ2dlcldpdGhvdXRQcm9taXNlIH07XG4iXX0= |
@@ -16,3 +16,5 @@ "use strict"; | ||
const { | ||
baseURL, | ||
url, | ||
params, | ||
method, | ||
@@ -24,3 +26,3 @@ data, | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Request').makeDateFormat(new Date()).makeMethod(method).makeUrl(url).makeHeader(headers).makeData(data).build(); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Request').makeDateFormat(new Date()).makeMethod(method).makeUrl(url, baseURL).makeParams(params).makeHeader(headers).makeData(data).build(); | ||
buildConfig.logger(log); | ||
@@ -32,2 +34,2 @@ return request; | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVxdWVzdC50cyJdLCJuYW1lcyI6WyJyZXF1ZXN0TG9nZ2VyIiwicmVxdWVzdCIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsImRhdGEiLCJoZWFkZXJzIiwiYnVpbGRDb25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ha2VIZWFkZXIoaGVhZGVycylcbiAgICAgICAgLm1ha2VEYXRhKGRhdGEpXG4gICAgICAgIC5idWlsZCgpO1xuXG4gICAgYnVpbGRDb25maWcubG9nZ2VyKGxvZyk7XG5cbiAgICByZXR1cm4gcmVxdWVzdDtcbn1cblxuZXhwb3J0IGRlZmF1bHQgcmVxdWVzdExvZ2dlcjtcbiJdfQ== |
@@ -17,4 +17,6 @@ "use strict"; | ||
config: { | ||
baseURL, | ||
url, | ||
method | ||
method, | ||
params | ||
}, | ||
@@ -28,3 +30,3 @@ status, | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Response').makeDateFormat(new Date()).makeMethod(method).makeUrl(url).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Response').makeDateFormat(new Date()).makeMethod(method).makeUrl(url, baseURL).makeParams(params).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
buildConfig.logger(log); | ||
@@ -36,2 +38,2 @@ return response; | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVzcG9uc2UudHMiXSwibmFtZXMiOlsicmVzcG9uc2VMb2dnZXIiLCJyZXNwb25zZSIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsInN0YXR1cyIsInN0YXR1c1RleHQiLCJkYXRhIiwiaGVhZGVycyIsImJ1aWxkQ29uZmlnIiwic3RyaW5nQnVpbGRlciIsIlN0cmluZ0J1aWxkZXIiLCJsb2ciLCJtYWtlTG9nVHlwZVdpdGhQcmVmaXgiLCJtYWtlRGF0ZUZvcm1hdCIsIkRhdGUiLCJtYWtlTWV0aG9kIiwibWFrZVVybCIsIm1ha2VTdGF0dXMiLCJtYWtlSGVhZGVyIiwibWFrZURhdGEiLCJidWlsZCIsImxvZ2dlciJdLCJtY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QcmVmaXgoJ1Jlc3BvbnNlJylcbiAgICAgICAgLm1ha2VEYXRlRm9ybWF0KG5ldyBEYXRlKCkpXG4gICAgICAgIC5tYWtlTWV0aG9kKG1ldGhvZClcbiAgICAgICAgLm1ha2VVcmwodXJsLCBiYXNlVVJMKVxuICAgICAgICAubWFrZVBhcmFtcyhwYXJhbXMpXG4gICAgICAgIC5tYWtlU3RhdHVzKHN0YXR1cywgc3RhdHVzVGV4dClcbiAgICAgICAgLm1ha2VIZWFkZXIoaGVhZGVycylcbiAgICAgICAgLm1ha2VEYXRhKGRhdGEpXG4gICAgICAgIC5idWlsZCgpO1xuXG4gICAgYnVpbGRDb25maWcubG9nZ2VyKGxvZyk7XG5cbiAgICByZXR1cm4gcmVzcG9uc2U7XG59XG5cbmV4cG9ydCBkZWZhdWx0IHJlc3BvbnNlTG9nZ2VyO1xuIl19 |
{ | ||
"name": "axios-logger", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Beautify Axios Logging Messages", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
"@types/node": "^12.19.9", | ||
"axios": "^0.18.0", | ||
"axios": "^0.21.1", | ||
"body-parser": "^1.19.0", | ||
@@ -41,0 +41,0 @@ "compression": "^1.7.4", |
@@ -126,2 +126,3 @@ # axios-logger | ||
| `url` | boolean | `true` | Whether to include the URL or not. | | ||
| `params` | boolean | `false` | Whether to include the URL params or not. | | ||
| `data` | boolean | `true` | Whether to include request/response data or not. | | ||
@@ -128,0 +129,0 @@ | `status` | boolean | `true` | Whether to include response statuses or not. | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44666
314
137