mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 10:22:44 +00:00
resolve java okhttp issue due to merge conflicts
This commit is contained in:
@@ -72,6 +72,8 @@ public class ApiClient {
|
||||
*/
|
||||
public ApiClient() {
|
||||
httpClient = new OkHttpClient();
|
||||
|
||||
|
||||
verifyingSsl = true;
|
||||
json = new JSON();
|
||||
|
||||
@@ -820,6 +822,13 @@ public class ApiClient {
|
||||
if (returnType == null || response.code() == 204) {
|
||||
// returning null if the returnType is not defined,
|
||||
// or the status code is 204 (No Content)
|
||||
if (response.body() != null) {
|
||||
try {
|
||||
response.body().close();
|
||||
} catch (IOException e) {
|
||||
throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
return deserialize(response, returnType);
|
||||
|
||||
Reference in New Issue
Block a user