onResponse method

void onResponse(
  1. Response response
)

Fires once per call for each response handed back as Right.

Not called for a 2xx that ApiConfig.isSuccess rejected — that goes to onFailure instead, since that is what the caller receives.

A *As<T> call whose parser then throws fires both: this first, for the HTTP outcome, then onFailure with ErrorSource.parseError. They are genuinely two events — the request succeeded and the body could not be understood — and collapsing them would hide one or the other.

Implementation

void onResponse(Response response) {}