We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55e4197 commit f1632ecCopy full SHA for f1632ec
core/src/main/java/feign/Response.java
@@ -17,6 +17,7 @@
17
import static feign.Util.checkNotNull;
18
import static feign.Util.checkState;
19
import static feign.Util.decodeOrDefault;
20
+import static feign.Util.toByteArray;
21
import static feign.Util.valuesOrEmpty;
22
23
import java.io.ByteArrayInputStream;
@@ -273,6 +274,15 @@ public Reader asReader(Charset charset) throws IOException {
273
274
public void close() throws IOException {
275
inputStream.close();
276
}
277
+
278
+ @Override
279
+ public String toString() {
280
+ try {
281
+ return new String(toByteArray(inputStream), UTF_8);
282
+ } catch (Exception e) {
283
+ return super.toString();
284
+ }
285
286
287
288
private static final class ByteArrayBody implements Response.Body {
0 commit comments