Not creating "Accept:null" header for Java-Jersey2 generator (#11084)

* updated ApiClient.mustache for jersey2

* updated samples

* corrected indentation

* updated samples
This commit is contained in:
S2021Git
2022-01-04 02:41:24 -06:00
committed by GitHub
parent 98a28a075a
commit 361b593da2
6 changed files with 36 additions and 6 deletions

View File

@@ -1106,7 +1106,12 @@ public class ApiClient extends JavaTimeFormatter {
}
}
Invocation.Builder invocationBuilder = target.request().accept(accept);
Invocation.Builder invocationBuilder;
if (accept != null) {
invocationBuilder = target.request().accept(accept);
} else {
invocationBuilder = target.request();
}
for (Entry<String, String> entry : cookieParams.entrySet()) {
String value = entry.getValue();