protected Response toFeignResponse(Request request, HttpResponse<InputStream> httpResponse) {
    final OptionalLong length = httpResponse.headers().firstValueAsLong("Content-Length");

    InputStream body = httpResponse.body();

    if (httpResponse.headers().allValues(CONTENT_ENCODING).contains(ENCODING_GZIP)) {
      try {
        body = new GZIPInputStream(body);
      } catch (IOException ignored) {
      }
    } else if (httpResponse.headers().allValues(CONTENT_ENCODING).contains(ENCODING_DEFLATE)) {
      body = new InflaterInputStream(body);
    }

    return Response.builder()
        .protocolVersion(enumForName(ProtocolVersion.class, httpResponse.version()))
        .body(body, length.isPresent() ? (int) length.getAsLong() : null)
        .reason(httpResponse.headers().firstValue("Reason-Phrase").orElse(null))
        .request(request)
        .status(httpResponse.statusCode())
        .headers(castMapCollectType(httpResponse.headers().map()))
        .build();
  }
Creates the new Http2Client using following defaults:

<ul>
  <li>Connect Timeout: 10 seconds, as {@link Request.Options#Options()} uses
  <li>Follow all 3xx redirects
  <li>HTTP 2
</ul>

@see Request.Options#Options()
java11/src/main/java/feign/http2client/Http2Client.java