code: private static HttpResponse ensureRequestSet(HttpResponse httpResponse) {
          Objects.requireNonNull(httpResponse.request());
          Objects.requireNonNull(httpResponse.request().httpMethod());
          return httpResponse;
      }
docs: Ensure that request property and method is set in the response.
  
  @param httpResponse the response to validate
  @return the validated response