|
|
|
@ -136,7 +136,6 @@ interface MethodHandler {
@@ -136,7 +136,6 @@ interface MethodHandler {
|
|
|
|
|
if (logLevel.get() != Logger.Level.NONE) { |
|
|
|
|
response = logger.logAndRebufferResponse(metadata.configKey(), logLevel.get(), response, elapsedTime); |
|
|
|
|
} |
|
|
|
|
if (response.status() >= 200 && response.status() < 300) { |
|
|
|
|
if (Response.class == metadata.returnType()) { |
|
|
|
|
if (response.body() == null) { |
|
|
|
|
return response; |
|
|
|
@ -144,7 +143,9 @@ interface MethodHandler {
@@ -144,7 +143,9 @@ interface MethodHandler {
|
|
|
|
|
// Ensure the response body is disconnected
|
|
|
|
|
byte[] bodyData = Util.toByteArray(response.body().asInputStream()); |
|
|
|
|
return Response.create(response.status(), response.reason(), response.headers(), bodyData); |
|
|
|
|
} else if (void.class == metadata.returnType()) { |
|
|
|
|
} |
|
|
|
|
if (response.status() >= 200 && response.status() < 300) { |
|
|
|
|
if (void.class == metadata.returnType()) { |
|
|
|
|
return null; |
|
|
|
|
} else { |
|
|
|
|
return decode(response); |
|
|
|
|