@@ -11,6 +11,7 @@ import {
1111 inflightUrlWithQuery ,
1212 InstanceOptions ,
1313 IOResponse ,
14+ RequestConfig ,
1415 RequestTracingConfig ,
1516} from '../../HttpClient'
1617import {
@@ -83,8 +84,15 @@ export class VBase extends InfraClient {
8384 } } )
8485 }
8586
86- public getJSON = < T > ( bucket : string , path : string , nullIfNotFound ?: boolean , conflictsResolver ?: ConflictsResolver < T > , tracingConfig ?: RequestTracingConfig ) => {
87- return this . getRawJSON < T > ( bucket , path , nullIfNotFound , conflictsResolver , tracingConfig )
87+ public getJSON = < T > (
88+ bucket : string ,
89+ path : string ,
90+ nullIfNotFound ?: boolean ,
91+ conflictsResolver ?: ConflictsResolver < T > ,
92+ tracingConfig ?: RequestTracingConfig ,
93+ requestConfig ?: RequestConfig
94+ ) => {
95+ return this . getRawJSON < T > ( bucket , path , nullIfNotFound , conflictsResolver , tracingConfig , requestConfig )
8896 . then ( response => response . data )
8997 }
9098
@@ -93,7 +101,8 @@ export class VBase extends InfraClient {
93101 path : string ,
94102 nullIfNotFound ?: boolean ,
95103 conflictsResolver ?: ConflictsResolver < T > ,
96- tracingConfig ?: RequestTracingConfig
104+ tracingConfig ?: RequestTracingConfig ,
105+ requestConfig ?: RequestConfig
97106 ) => {
98107 const headers = conflictsResolver ? { 'X-Vtex-Detect-Conflicts' : true } : { }
99108 const inflightKey = inflightURL
@@ -108,6 +117,7 @@ export class VBase extends InfraClient {
108117 requestSpanNameSuffix : metric ,
109118 ...tracingConfig ?. tracing ,
110119 } ,
120+ ...requestConfig
111121 } as IgnoreNotFoundRequestConfig )
112122 . catch ( async ( error : AxiosError < T > ) => {
113123 const { response } = error
0 commit comments