@@ -11,6 +11,7 @@ import {
11
11
inflightUrlWithQuery ,
12
12
InstanceOptions ,
13
13
IOResponse ,
14
+ RequestConfig ,
14
15
RequestTracingConfig ,
15
16
} from '../../HttpClient'
16
17
import {
@@ -83,8 +84,15 @@ export class VBase extends InfraClient {
83
84
} } )
84
85
}
85
86
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 )
88
96
. then ( response => response . data )
89
97
}
90
98
@@ -93,7 +101,8 @@ export class VBase extends InfraClient {
93
101
path : string ,
94
102
nullIfNotFound ?: boolean ,
95
103
conflictsResolver ?: ConflictsResolver < T > ,
96
- tracingConfig ?: RequestTracingConfig
104
+ tracingConfig ?: RequestTracingConfig ,
105
+ requestConfig ?: RequestConfig
97
106
) => {
98
107
const headers = conflictsResolver ? { 'X-Vtex-Detect-Conflicts' : true } : { }
99
108
const inflightKey = inflightURL
@@ -108,6 +117,7 @@ export class VBase extends InfraClient {
108
117
requestSpanNameSuffix : metric ,
109
118
...tracingConfig ?. tracing ,
110
119
} ,
120
+ ...requestConfig
111
121
} as IgnoreNotFoundRequestConfig )
112
122
. catch ( async ( error : AxiosError < T > ) => {
113
123
const { response } = error
0 commit comments