Commons HttpClient:配置https代理

问题描述

我已经能够使用 curl 和 HTTPS_PROXY 到达目的地:

$ echo $HTTPS_PROXY
http://10.49.1.1:8080/

那么:

$ curl destination_url
HTTP/1.1 200 Connection established

当我尝试配置我的 httpClient 时,它无法访问我的目标网址:

我正在使用此代码:

HttpHost httpHost = new HttpHost("10.49.1.1",8080,"http");
this.httpClient = HttpClients.custom().setProxy(httpHost).build();

然而,它无法到达我的目的地。

有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...