嗨,我在用 HttpsURLConnection
为了连接外部服务,它只在很少的事务中工作,但是在一段时间之后它失败了,并且得到了低于错误的结果
Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden
我打印 connection.getErrorStream()
它给 null
请查找以下代码,它在os=connection.getoutputstream()处失败;
connection = restConfiguration.getSSLConnection(url, connection);
connection.setDoOutput(true);
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
connection.setRequestProperty("Accept", "application/json; charset=UTF-8");
connection.setRequestProperty("Authorization", "Bearer " + authorization);
os = connection.getOutputStream();
os.write(signOrderRequest.toJson().getBytes("UTF-8"));
os.flush();
有什么建议和想法吗?
暂无答案!
目前还没有任何答案,快来回答吧!