code: private function setHost($host)
      {
          if ('' === $host || false !== filter_var('http://'.$host, FILTER_VALIDATE_URL)) {
              $this->host = $host;
          } else {
              throw new \InvalidArgumentException("Invalid or unsupported host");
          }
      }
docs: @param string $host
  
  @throws \InvalidArgumentException