Armeria WebClient 请求与连接工厂和 Req header

Armeria WebClient request with connection factory and Req header

我一直在尝试使用 armeria 建立 https 连接 WebClient 由于未指定连接工厂,我得到 javax.net.ssl.SSLHandshakeException 谁能帮忙举个相关的例子。? 谢谢

  RequestHeaders header = RequestHeaders.of(HttpMethod.GET, endpoint, HttpHeaderNames.COOKIE,
            cookieHeader);
    WebClient.of(clientFactory(), hosturl)
    .execute(header)
    .aggregate()
    .whenCompleteAsync((resp,cause)->{
        if(cause != null) {
           //TODO
        }
        else if(resp.status()==HttpStatus.OK) {
            //TODO
        }
        else
        {
            //TODO
        }


    });




 public static ClientFactory clientFactory() {

    return ClientFactory.builder().sslContextCustomizer(b -> b.trustManager(InsecureTrustManagerFactory.INSTANCE))
            .idleTimeout(Duration.ZERO).build();
}