MCPcopy Index your code
hub / github.com/OpenFeign/feign / proceed

Method proceed

core/src/main/java/feign/InvocationContext.java:69–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67 }
68
69 public Object proceed() throws Exception {
70 if (returnType == Response.class) {
71 return disconnectResponseBodyIfNeeded(response);
72 }
73
74 try {
75 final boolean shouldDecodeResponseBody =
76 (response.status() >= 200 && response.status() < 300)
77 || (response.status() == 404 && dismiss404 && !isVoidType(returnType));
78
79 if (!shouldDecodeResponseBody) {
80 throw decodeError(configKey, response);
81 }
82
83 if (isVoidType(returnType) && !decodeVoid) {
84 ensureClosed(response.body());
85 return null;
86 }
87
88 Class<?> rawType = Types.getRawType(returnType);
89 if (TypedResponse.class.isAssignableFrom(rawType)) {
90 Type bodyType = Types.resolveLastTypeParameter(returnType, TypedResponse.class);
91 return TypedResponse.builder(response).body(decode(response, bodyType)).build();
92 }
93
94 return decode(response, returnType);
95 } finally {
96 if (closeAfterDecode) {
97 ensureClosed(response.body());
98 }
99 }
100 }
101
102 private static Response disconnectResponseBodyIfNeeded(Response response) throws IOException {
103 final boolean shouldDisconnectResponseBody =

Callers

nothing calls this directly

Calls 11

isVoidTypeMethod · 0.95
decodeErrorMethod · 0.95
getRawTypeMethod · 0.95
builderMethod · 0.95
decodeMethod · 0.95
ensureClosedMethod · 0.80
bodyMethod · 0.65
statusMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected