resolve java okhttp issue due to merge conflicts

This commit is contained in:
wing328
2017-03-14 00:09:01 +08:00
parent ef40bdb7b0
commit f1e237f76f
3 changed files with 26 additions and 3 deletions

View File

@@ -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);