src/Protocol/Http/Request.php
public function withHeader(string $name, string $value): Request
    {
        $cloned = clone $this;

        $cloned->headers[$name] = $value;

        return $cloned;
    }
public function withHeader(string $name, string $value): Request
    {
        $cloned = clone $this;

        $cloned->headers[$name] = $value;

        return $cloned;
    }
Add or replace header

@param string $name
@param string $value

@return Request