UNPKG

@vepler/http-client

Version:

A flexible and extensible API service library for making HTTP requests with built-in authentication support for bearer tokens and API keys.

22 lines (21 loc) 783 B
import { AxiosError, AxiosResponse, AxiosRequestConfig } from 'axios'; /** * Clean sensitive data from headers */ export declare function sanitizeHeaders(headers?: Record<string, any>): Record<string, any>; /** * Truncate strings, arrays and objects to prevent excessive logging */ export declare function truncateData(data: any, depth?: number): any; /** * Clean an Axios config object for safe logging */ export declare function sanitizeConfig(config?: AxiosRequestConfig): AxiosRequestConfig; /** * Clean an Axios response object for safe logging */ export declare function sanitizeResponse(response?: AxiosResponse): any; /** * Extract relevant information from a rejected Axios error */ export declare function parseAxiosError(error: AxiosError): Record<string, any>;