isSuccess method

bool isSuccess()

Check if the request was successful. Returns true if the HTTP status code is between 200

Implementation

bool isSuccess() {
  return httpCode != null && httpCode! >= 200 && httpCode! < 300;
}