checkResponse method

void checkResponse(
  1. HttpClientResponse res
)

Implementation

void checkResponse(HttpClientResponse res) {
  if (res.statusCode - 200 >= 200) {
    throw HttpException(res.reasonPhrase);
  }
}