/**
  * @param string $url
  *
  * @return string
  * @throws RequestException
  */
 public function getBody($url)
 {
     $i = 0;
     do {
         $response = $this->doGet($url);
         if ($response->isSuccessful()) {
             return $response->getBody();
         }
         sleep($this->configuration->getSleepBetweenTrials());
     } while (++$i < $this->configuration->getMaxTrials());
     throw new RequestException($response->getError());
 }