From 34edc66bc26b92fa3d51ed2a45b48a624b92e137 Mon Sep 17 00:00:00 2001 From: StevanFreeborn Date: Wed, 1 Feb 2023 23:08:15 -0600 Subject: [PATCH] fix: add optional config parameter to get method --- src/OnspringClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OnspringClient.ts b/src/OnspringClient.ts index f424a98..c5f3713 100644 --- a/src/OnspringClient.ts +++ b/src/OnspringClient.ts @@ -1,4 +1,4 @@ -import { AxiosInstance, AxiosResponse } from 'axios'; +import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import axios from 'axios'; import { ArgumentValidator } from './models/ArgumentValidator'; import { EndpointFactory } from './models/EndpointFactory'; @@ -101,8 +101,8 @@ export class OnspringClient { * @param {string} endpoint - The endpoint that will be used to make the request. * @returns {Promise>} - A promise that resolves to an ApiResponse of type T. */ - private async get(endpoint: string): Promise> { - const response = await this._client.get(endpoint); + private async get(endpoint: string, config: AxiosRequestConfig = {}): Promise> { + const response = await this._client.get(endpoint, config); const apiResponse = ApiResponseFactory.getApiResponse(response); return apiResponse; }