title: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Forbidden
body: <p>Hi I am using <code>HttpsURLConnection</code> to connect external service it works for few transaction but after some time it fails and get below error</p>
  <pre><code>Unable to tunnel through proxy. Proxy returns &quot;HTTP/1.1 403 Forbidden
  </code></pre>
  <p>I print <code>connection.getErrorStream()</code> it gives <code>null</code></p>
  <p>Please find below code it is failing at os = connection.getOutputStream();</p>
  <pre><code>connection = restConfiguration.getSSLConnection(url, connection);
  connection.setDoOutput(true);
  connection.setRequestMethod(&quot;POST&quot;);
  connection.setRequestProperty(&quot;Content-Type&quot;, &quot;application/json; charset=UTF-8&quot;);
  connection.setRequestProperty(&quot;Accept&quot;, &quot;application/json; charset=UTF-8&quot;);
  connection.setRequestProperty(&quot;Authorization&quot;, &quot;Bearer &quot; + authorization);
  os = connection.getOutputStream();
  os.write(signOrderRequest.toJson().getBytes(&quot;UTF-8&quot;));
  os.flush();
  </code></pre>
  <p>Any suggestions, ideas?</p>