httpclient隧道失败,got:502
我正在尝试通过春季启动应用程序中的httpclient连接端点,使隧道失败,got:502错误。我可以通过Postman访问,并能够看到回应。
启动应用程序时,我使用的是与Postman中相同的代理连接。
java.io.IOException: Tunnel failed, got: 502
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:565) ~[java.net.http:na]
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:119) ~[java.net.http:na]
I am trying to connect a endpoint through HttpClient in my Spring boot application getting Tunnel failed, got: 502 error. I could access through postman and able to see the response.
I am using same proxy connection as in postman while starting the application.
java.io.IOException: Tunnel failed, got: 502
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:565) ~[java.net.http:na]
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:119) ~[java.net.http:na]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过使用RESTTEMPLATE而不是httpclient解决。 HTTPClient未获取JVM代理详细信息。
Resolved by using RestTemplate instead of HttpClient. HttpClient not taken the JVM proxy details.