code: public RpcResponse request(RpcRequest req) {
          InputStream is = null;
          try {
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              serializer.write(req.marshal(contract), bos);
              bos.close();
              byte[] data = bos.toByteArray();
  
              is = requestRaw(data);
              return unmarshal(req, serializer.readMap(is));
          }
          catch (RpcException e) {
              return new RpcResponse(req, e);
          }
          catch (IOException e) {
              String msg = "IOException requesting " + req.getMethod() + 
                  " from: " + endpoint + " - " + e.getMessage();
              RpcException exc = RpcException.Error.INTERNAL.exc(msg);
              return new RpcResponse(req, exc);
          }
          finally {
              closeQuietly(is);
          }
      }
docs: Makes a RPC call via HTTP(S) to the remote server