code: public HttpURLConnection getConnection() throws IOException, ProtocolException {
          HttpURLConnection conn = HttpUtils.getHttpConnection(constructUrl(), expectedResponseCode, allowedUnexpectedResponseCodes, 30, method, headers, streamToWrite);
          return conn;
      }
docs: /*
  @return
  
  @throws IOException
  
  @throws ProtocolException