code: private void sendRequest(byte[] reqBytes, URLConnection connection) {
          HttpURLConnection httpconnection = (HttpURLConnection) connection;
          OutputStream out = null;
          try {
              if (connectTimeout > 0) {
                  httpconnection.setConnectTimeout(connectTimeout);
              }
              if (readTimeout > 0) {
                  httpconnection.setReadTimeout(readTimeout);
              }
              httpconnection.setRequestMethod("POST");
              httpconnection.setUseCaches(false);
              httpconnection.setDoInput(true);
              httpconnection.setDoOutput(true);
              httpconnection.setRequestProperty("Content-Type", serializeHandler.getProtocol()
                      .getName() + ";charset=" + NaviRpcClientConstant.ENDODING);
              httpconnection.setRequestProperty("Content-Length", StringUtil.EMPTY + reqBytes.length);
              httpconnection.connect();
              out = httpconnection.getOutputStream();
              out.write(reqBytes);
              if (LOG.isDebugEnabled()) {
                  LOG.debug("Send " + reqBytes.length + " bytes done");
              }
          } catch (Exception e) {
              throw new RpcException("Rpc send request failed - " + e.getMessage() + " on "
                      + connection.getURL(), e);
          } finally {
              if (out != null) {
                  try {
                      out.close();
                  } catch (IOException e) {
                      LOG.error("Close send request connection error");
                  }
              }
          }
      }
docs: 发送请求字节码
  
  @param reqBytes
  @param connection
  @throws IOException