public function addHeader($key, $value) {
    if (!is_string($key)) {
      $error = sprintf("Header key is not a string (Actual type: %s).",
                       gettype($key));
      throw new \InvalidArgumentException($error);
    }
    $this->addHeaderArray(array($key => $value));
  }