throwIfFailed method

ClientResponse throwIfFailed()

Throws RequestException on a 4xx or 5xx response.

Implementation

ClientResponse throwIfFailed() {
  if (failed) {
    throw RequestException(this);
  }
  return this;
}