MCPcopy
hub / github.com/square/retrofit / onResponse

Method onResponse

retrofit/src/main/java/retrofit2/OkHttpCall.java:152–169  ·  view source on GitHub ↗
(okhttp3.Call call, okhttp3.Response rawResponse)

Source from the content-addressed store, hash-verified

150 call.enqueue(
151 new okhttp3.Callback() {
152 @Override
153 public void onResponse(okhttp3.Call call, okhttp3.Response rawResponse) {
154 Response<T> response;
155 try {
156 response = parseResponse(rawResponse);
157 } catch (Throwable e) {
158 throwIfFatal(e);
159 callFailure(e);
160 return;
161 }
162
163 try {
164 callback.onResponse(OkHttpCall.this, response);
165 } catch (Throwable t) {
166 throwIfFatal(t);
167 t.printStackTrace(); // TODO this is not great
168 }
169 }
170
171 @Override
172 public void onFailure(okhttp3.Call call, IOException e) {

Callers

nothing calls this directly

Calls 4

parseResponseMethod · 0.95
callFailureMethod · 0.95
throwIfFatalMethod · 0.80
onResponseMethod · 0.65

Tested by

no test coverage detected