protected function perform(callable $callback, ...$params)
  {
    $result = $callback($this->curl, ...$params);
    if(curl_errno($this->curl) !== CURLE_OK)
      throw new CurlException($this->curl);

    if($result === false)
      throw new CurlException("Unable to perform $callback - unknown error.");

    return $result;
  }