Skip to content

Commit ef22749

Browse files
inemtsevIlya Nemtsev
andauthored
[Java][native] Add ability to add header to specific calls (#21495)
* add bearer capability * avoid using shared state * revert needless change * Revert authentication changes from unused root Java/api.mustache template * applied change to correct lib type * updated test files * made security method more generic for flexibility * regenerated samples * further cleanup * code style * regenerated samples * made header assignment more explicit, per each method * fixed extra comma * fixed commas, regenerated samples * moved header population to utility method * moved static class inside main class * regenerated samples * added comments, fixed indentation * regenerated samples --------- Co-authored-by: Ilya Nemtsev <ilyanemtsev@192.168.1.34>
1 parent f1a0935 commit ef22749

File tree

256 files changed

+52032
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+52032
-416
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache

Lines changed: 136 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@ import java.util.concurrent.CompletableFuture;
5757

5858
{{#operations}}
5959
public class {{classname}} {
60+
/**
61+
* Utility class for extending HttpRequest.Builder functionality.
62+
*/
63+
private static class HttpRequestBuilderExtensions {
64+
/**
65+
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
66+
*
67+
* @param builder the HttpRequest.Builder to which headers will be added
68+
* @param headers a map of header names and values to add; may be null
69+
* @return the same HttpRequest.Builder instance with the additional headers set
70+
*/
71+
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
72+
if (headers != null) {
73+
for (Map.Entry<String, String> entry : headers.entrySet()) {
74+
builder.header(entry.getKey(), entry.getValue());
75+
}
76+
}
77+
return builder;
78+
}
79+
}
6080
private final HttpClient memberVarHttpClient;
6181
private final ObjectMapper memberVarObjectMapper;
6282
private final String memberVarBaseUri;
@@ -78,6 +98,7 @@ public class {{classname}} {
7898
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
7999
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
80100
}
101+
81102
{{#asyncNative}}
82103

83104
private ApiException getApiException(String operationId, HttpResponse<String> response) {
@@ -177,11 +198,40 @@ public class {{classname}} {
177198
@Deprecated
178199
{{/isDeprecated}}
179200
public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest) throws ApiException {
201+
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}(apiRequest, null);
202+
}
203+
204+
/**
205+
* {{summary}}
206+
* {{notes}}
207+
* @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request}
208+
* @param headers Optional headers to include in the request
209+
{{#returnType}}
210+
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}{{returnType}}{{#asyncNative}}&gt;{{/asyncNative}}
211+
{{/returnType}}
212+
{{^returnType}}
213+
{{#asyncNative}}
214+
* @return CompletableFuture&lt;Void&gt;
215+
{{/asyncNative}}
216+
{{/returnType}}
217+
* @throws ApiException if fails to make API call
218+
{{#isDeprecated}}
219+
* @deprecated
220+
{{/isDeprecated}}
221+
{{#externalDocs}}
222+
* {{description}}
223+
* @see <a href="{{url}}">{{summary}} Documentation</a>
224+
{{/externalDocs}}
225+
*/
226+
{{#isDeprecated}}
227+
@Deprecated
228+
{{/isDeprecated}}
229+
public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest, Map<String, String> headers) throws ApiException {
180230
{{#allParams}}
181231
{{>nullable_var_annotations}}{{! prevent indent}}
182232
{{{dataType}}} {{paramName}} = apiRequest.{{paramName}}();
183233
{{/allParams}}
184-
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
234+
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
185235
}
186236

187237
/**
@@ -202,10 +252,32 @@ public class {{classname}} {
202252
@Deprecated
203253
{{/isDeprecated}}
204254
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest) throws ApiException {
255+
return {{operationId}}WithHttpInfo(apiRequest, null);
256+
}
257+
258+
/**
259+
* {{summary}}
260+
* {{notes}}
261+
* @param apiRequest {@link API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request}
262+
* @param headers Optional headers to include in the request
263+
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}}
264+
* @throws ApiException if fails to make API call
265+
{{#isDeprecated}}
266+
* @deprecated
267+
{{/isDeprecated}}
268+
{{#externalDocs}}
269+
* {{description}}
270+
* @see <a href="{{url}}">{{summary}} Documentation</a>
271+
{{/externalDocs}}
272+
*/
273+
{{#isDeprecated}}
274+
@Deprecated
275+
{{/isDeprecated}}
276+
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request apiRequest, Map<String, String> headers) throws ApiException {
205277
{{#allParams}}
206278
{{{dataType}}} {{paramName}} = apiRequest.{{paramName}}();
207279
{{/allParams}}
208-
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
280+
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
209281
}
210282

211283
{{/hasParams}}
@@ -237,15 +309,46 @@ public class {{classname}} {
237309
@Deprecated
238310
{{/isDeprecated}}
239311
public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
312+
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}null);
313+
}
314+
315+
/**
316+
* {{summary}}
317+
* {{notes}}
318+
{{#allParams}}
319+
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
320+
{{/allParams}}
321+
* @param headers Optional headers to include in the request
322+
{{#returnType}}
323+
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}{{returnType}}{{#asyncNative}}&gt;{{/asyncNative}}
324+
{{/returnType}}
325+
{{^returnType}}
326+
{{#asyncNative}}
327+
* @return CompletableFuture&lt;Void&gt;
328+
{{/asyncNative}}
329+
{{/returnType}}
330+
* @throws ApiException if fails to make API call
331+
{{#isDeprecated}}
332+
* @deprecated
333+
{{/isDeprecated}}
334+
{{#externalDocs}}
335+
* {{description}}
336+
* @see <a href="{{url}}">{{summary}} Documentation</a>
337+
{{/externalDocs}}
338+
*/
339+
{{#isDeprecated}}
340+
@Deprecated
341+
{{/isDeprecated}}
342+
public {{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}}{{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void>{{/asyncNative}}{{^asyncNative}}void{{/asyncNative}}{{/returnType}} {{operationId}}({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map<String, String> headers) throws ApiException {
240343
{{^asyncNative}}
241-
{{#returnType}}ApiResponse<{{{.}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
344+
{{#returnType}}ApiResponse<{{{.}}}> localVarResponse = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
242345
{{#returnType}}
243346
return localVarResponse.getData();
244347
{{/returnType}}
245348
{{/asyncNative}}
246349
{{#asyncNative}}
247350
try {
248-
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
351+
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
249352
return memberVarHttpClient.sendAsync(
250353
localVarRequestBuilder.build(),
251354
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
@@ -293,8 +396,32 @@ public class {{classname}} {
293396
@Deprecated
294397
{{/isDeprecated}}
295398
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
399+
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}null);
400+
}
401+
402+
/**
403+
* {{summary}}
404+
* {{notes}}
405+
{{#allParams}}
406+
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
407+
{{/allParams}}
408+
* @param headers Optional headers to include in the request
409+
* @return {{#asyncNative}}CompletableFuture&lt;{{/asyncNative}}ApiResponse&lt;{{returnType}}{{^returnType}}Void{{/returnType}}&gt;{{#asyncNative}}&gt;{{/asyncNative}}
410+
* @throws ApiException if fails to make API call
411+
{{#isDeprecated}}
412+
* @deprecated
413+
{{/isDeprecated}}
414+
{{#externalDocs}}
415+
* {{description}}
416+
* @see <a href="{{url}}">{{summary}} Documentation</a>
417+
{{/externalDocs}}
418+
*/
419+
{{#isDeprecated}}
420+
@Deprecated
421+
{{/isDeprecated}}
422+
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map<String, String> headers) throws ApiException {
296423
{{^asyncNative}}
297-
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
424+
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
298425
try {
299426
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
300427
localVarRequestBuilder.build(),
@@ -386,7 +513,7 @@ public class {{classname}} {
386513
{{/asyncNative}}
387514
{{#asyncNative}}
388515
try {
389-
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
516+
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}headers);
390517
return memberVarHttpClient.sendAsync(
391518
localVarRequestBuilder.build(),
392519
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
@@ -423,7 +550,7 @@ public class {{classname}} {
423550
{{/asyncNative}}
424551
}
425552

426-
private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
553+
private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{>nullable_var_annotations}} {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#hasParams}}, {{/hasParams}}Map<String, String> headers) throws ApiException {
427554
{{#allParams}}
428555
{{#required}}
429556
// verify the required parameter '{{paramName}}' is set
@@ -628,6 +755,8 @@ public class {{classname}} {
628755
if (memberVarReadTimeout != null) {
629756
localVarRequestBuilder.timeout(memberVarReadTimeout);
630757
}
758+
// Add custom headers if provided
759+
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
631760
if (memberVarInterceptor != null) {
632761
memberVarInterceptor.accept(localVarRequestBuilder);
633762
}

samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/AuthApi.java

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@
4646

4747
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
4848
public class AuthApi {
49+
/**
50+
* Utility class for extending HttpRequest.Builder functionality.
51+
*/
52+
private static class HttpRequestBuilderExtensions {
53+
/**
54+
* Adds additional headers to the provided HttpRequest.Builder. Useful for adding method/endpoint specific headers.
55+
*
56+
* @param builder the HttpRequest.Builder to which headers will be added
57+
* @param headers a map of header names and values to add; may be null
58+
* @return the same HttpRequest.Builder instance with the additional headers set
59+
*/
60+
static HttpRequest.Builder withAdditionalHeaders(HttpRequest.Builder builder, Map<String, String> headers) {
61+
if (headers != null) {
62+
for (Map.Entry<String, String> entry : headers.entrySet()) {
63+
builder.header(entry.getKey(), entry.getValue());
64+
}
65+
}
66+
return builder;
67+
}
68+
}
4969
private final HttpClient memberVarHttpClient;
5070
private final ObjectMapper memberVarObjectMapper;
5171
private final String memberVarBaseUri;
@@ -68,6 +88,7 @@ public AuthApi(ApiClient apiClient) {
6888
memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor();
6989
}
7090

91+
7192
protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException {
7293
String body = response.body() == null ? null : new String(response.body().readAllBytes());
7394
String message = formatExceptionMessage(operationId, response.statusCode(), body);
@@ -136,7 +157,18 @@ private File prepareDownloadFile(HttpResponse<InputStream> response) throws IOEx
136157
* @throws ApiException if fails to make API call
137158
*/
138159
public String testAuthHttpBasic() throws ApiException {
139-
ApiResponse<String> localVarResponse = testAuthHttpBasicWithHttpInfo();
160+
return testAuthHttpBasic(null);
161+
}
162+
163+
/**
164+
* To test HTTP basic authentication
165+
* To test HTTP basic authentication
166+
* @param headers Optional headers to include in the request
167+
* @return String
168+
* @throws ApiException if fails to make API call
169+
*/
170+
public String testAuthHttpBasic(Map<String, String> headers) throws ApiException {
171+
ApiResponse<String> localVarResponse = testAuthHttpBasicWithHttpInfo(headers);
140172
return localVarResponse.getData();
141173
}
142174

@@ -147,7 +179,18 @@ public String testAuthHttpBasic() throws ApiException {
147179
* @throws ApiException if fails to make API call
148180
*/
149181
public ApiResponse<String> testAuthHttpBasicWithHttpInfo() throws ApiException {
150-
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBasicRequestBuilder();
182+
return testAuthHttpBasicWithHttpInfo(null);
183+
}
184+
185+
/**
186+
* To test HTTP basic authentication
187+
* To test HTTP basic authentication
188+
* @param headers Optional headers to include in the request
189+
* @return ApiResponse&lt;String&gt;
190+
* @throws ApiException if fails to make API call
191+
*/
192+
public ApiResponse<String> testAuthHttpBasicWithHttpInfo(Map<String, String> headers) throws ApiException {
193+
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBasicRequestBuilder(headers);
151194
try {
152195
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
153196
localVarRequestBuilder.build(),
@@ -183,7 +226,7 @@ public ApiResponse<String> testAuthHttpBasicWithHttpInfo() throws ApiException {
183226
}
184227
}
185228

186-
private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiException {
229+
private HttpRequest.Builder testAuthHttpBasicRequestBuilder(Map<String, String> headers) throws ApiException {
187230

188231
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
189232

@@ -197,6 +240,8 @@ private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiExceptio
197240
if (memberVarReadTimeout != null) {
198241
localVarRequestBuilder.timeout(memberVarReadTimeout);
199242
}
243+
// Add custom headers if provided
244+
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
200245
if (memberVarInterceptor != null) {
201246
memberVarInterceptor.accept(localVarRequestBuilder);
202247
}
@@ -210,7 +255,18 @@ private HttpRequest.Builder testAuthHttpBasicRequestBuilder() throws ApiExceptio
210255
* @throws ApiException if fails to make API call
211256
*/
212257
public String testAuthHttpBearer() throws ApiException {
213-
ApiResponse<String> localVarResponse = testAuthHttpBearerWithHttpInfo();
258+
return testAuthHttpBearer(null);
259+
}
260+
261+
/**
262+
* To test HTTP bearer authentication
263+
* To test HTTP bearer authentication
264+
* @param headers Optional headers to include in the request
265+
* @return String
266+
* @throws ApiException if fails to make API call
267+
*/
268+
public String testAuthHttpBearer(Map<String, String> headers) throws ApiException {
269+
ApiResponse<String> localVarResponse = testAuthHttpBearerWithHttpInfo(headers);
214270
return localVarResponse.getData();
215271
}
216272

@@ -221,7 +277,18 @@ public String testAuthHttpBearer() throws ApiException {
221277
* @throws ApiException if fails to make API call
222278
*/
223279
public ApiResponse<String> testAuthHttpBearerWithHttpInfo() throws ApiException {
224-
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBearerRequestBuilder();
280+
return testAuthHttpBearerWithHttpInfo(null);
281+
}
282+
283+
/**
284+
* To test HTTP bearer authentication
285+
* To test HTTP bearer authentication
286+
* @param headers Optional headers to include in the request
287+
* @return ApiResponse&lt;String&gt;
288+
* @throws ApiException if fails to make API call
289+
*/
290+
public ApiResponse<String> testAuthHttpBearerWithHttpInfo(Map<String, String> headers) throws ApiException {
291+
HttpRequest.Builder localVarRequestBuilder = testAuthHttpBearerRequestBuilder(headers);
225292
try {
226293
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
227294
localVarRequestBuilder.build(),
@@ -257,7 +324,7 @@ public ApiResponse<String> testAuthHttpBearerWithHttpInfo() throws ApiException
257324
}
258325
}
259326

260-
private HttpRequest.Builder testAuthHttpBearerRequestBuilder() throws ApiException {
327+
private HttpRequest.Builder testAuthHttpBearerRequestBuilder(Map<String, String> headers) throws ApiException {
261328

262329
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
263330

@@ -271,6 +338,8 @@ private HttpRequest.Builder testAuthHttpBearerRequestBuilder() throws ApiExcepti
271338
if (memberVarReadTimeout != null) {
272339
localVarRequestBuilder.timeout(memberVarReadTimeout);
273340
}
341+
// Add custom headers if provided
342+
localVarRequestBuilder = HttpRequestBuilderExtensions.withAdditionalHeaders(localVarRequestBuilder, headers);
274343
if (memberVarInterceptor != null) {
275344
memberVarInterceptor.accept(localVarRequestBuilder);
276345
}

0 commit comments

Comments
 (0)