PoolingHttpClientConnectionManager: How to do Https requests?

前端 未结 1 363
野性不改
野性不改 2020-12-23 18:13

I\'m currently trying to do multiple HttpGet requests at the same time with CloseableHttpClient.
I googled on how to do that and the answer was

相关标签:
1条回答
  • 2020-12-23 18:59

    Found the answer: https://stackoverflow.com/a/19950935/1223253

    Just had to add

    Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory> create().register("https", sslsf).build();
    

    and pass socketFactoryRegistry as parameter to the constructor of PoolingHttpClientConnectionManager. Now it works just fine :)

    0 讨论(0)
提交回复
热议问题