code: public static boolean isScOk(HttpResponse response) {
          return response != null && response.getStatusLine()!= null &&
                  response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
      }
docs: Check if HttpResponse contains status code 200(SC_OK).
  @param response instance of HttpResponse.
  @return {@code true} if HttpResponse contains status code 200(SC_OK), {@code false} otherwise.