import { AxiosResponse } from 'axios'; import HttpClientConfig from '../Types/HttpClientConfig'; import HttpClientRequestConfig from '../Types/HttpClientRequestConfig'; import HttpClientRetryConfig from '../Types/HttpClientRetryConfig'; export default class HttpClient { static DEFAULT_USER_AGENT: string; static DEFAULT_REQUEST_MAX_RETRIES: number; static DEFAULT_TIMEOUT_IN_MILLISECONDS: number; config?: HttpClientConfig; private axiosInstance; private loggerService; /** * Constructor */ constructor(config?: HttpClientConfig); /** * Initialize axios instance */ private initializeAxios; /** * Get default user agent or configured one */ private getDefaultUserAgentOrConfiguredOne; /** * Make request */ request(config: HttpClientRequestConfig): Promise; /** * Make request with retry */ requestWithRetry(config: HttpClientRequestConfig, retryConfig: HttpClientRetryConfig): Promise; /** * Make request */ private makeRequest; /** * Check if request should be retried according to http return code */ private checkIfRequestShouldBeRetriedAccordingToHttpReturnCode; /** * Log */ private log; /** * Checks if debug is enabled */ private isDebugEnabled; }