TP-74032 | Journey Revamp Phase 1 | API Endpoint Changes (#11865)
Co-authored-by: Prajjaval Verma <prajjaval.verma@navi.com>
This commit is contained in:
committed by
GitHub
parent
cbc3843305
commit
6d8f1b2933
@@ -14,6 +14,7 @@ function newAbortSignal(timeoutMs: number): AbortSignal {
|
||||
export const get = async <T>(
|
||||
url: string,
|
||||
config?: AxiosRequestConfig,
|
||||
params?: Record<string, any>,
|
||||
): Promise<T> => {
|
||||
try {
|
||||
let requestConfig: AxiosRequestConfig = config || {};
|
||||
@@ -30,6 +31,10 @@ export const get = async <T>(
|
||||
|
||||
addBundleVersionToHeader(axiosInstance);
|
||||
|
||||
if (params) {
|
||||
requestConfig.params = params;
|
||||
}
|
||||
|
||||
const response = await axiosInstance.get<T>(baseUrl + url, requestConfig);
|
||||
return handleSuccess<T>(response);
|
||||
} catch (error) {
|
||||
|
||||
@@ -9,6 +9,7 @@ interface QuoteOfferRequest {
|
||||
preQuoteId?: string | null;
|
||||
policyToBeCopied?: string;
|
||||
applicationType?: string;
|
||||
applicationId?: string | null;
|
||||
}
|
||||
|
||||
interface Term {
|
||||
|
||||
Reference in New Issue
Block a user