CloseableHttpClient 中各参数的意思

CloseableHttpClient httpClient = HttpClients.custom()
        .setMaxConnTotal(10) // 设置连接池中最大连接数为10
        .setMaxConnPerRoute(5) // 设置每个路由的最大连接数为5
        .build();

Further Reading

[实践总结] 使用Apache HttpClient 4.x进行进行一次Http请求
RequestConfig配置类中各参数的意思
CloseableHttpClient 中各参数的意思

猜你喜欢

转载自blog.csdn.net/weixin_37646636/article/details/134838717