code: public function request($method, Endpoint $endpoint, $path, Message $message = null)
      {
          $message = $message ?: new Message();
  
          // We'll try to reach backend several times before throwing exception.
          $i = 0;
          do {
              ++$i;
              if ($responseMessage = $this->requestStream($method, $endpoint, $path, $message)) {
                  return $responseMessage;
              }
  
              usleep($this->retryWaitMs * 1000);
          } while ($i < $this->connectionRetry);
  
          if ($this->logger instanceof LoggerInterface) {
              $this->logger->error(
                  sprintf('Connection to %s failed, attempted %d times', $endpoint->getURL(), $this->connectionRetry)
              );
          }
  
          throw new ConnectionException($endpoint->getURL(), $path, $method);
      }
docs: Execute a HTTP request to the remote server.
  
  Returns the result from the remote server.
  
  @param string $method
  @param \EzSystems\EzPlatformSolrSearchEngine\Gateway\Endpoint $endpoint
  @param string $path
  @param Message $message
  
  @return Message