public function setHeader(string $name, $value) {
        $key = strtolower($name);

        if ($value === null) {
            unset($this->headerNames[$key], $this->headers[$key]);
        } else {
            $this->headerNames[$key] = $name;
            $this->headers[$key] = (array)$value;
        }

        return $this;
    }