src/rehyved/Http/HttpRequest.php
public function header(string $name, $value): HttpRequest
    {
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = array();
        }
        $this->headers[$name][] = $value;

        return $this;
    }
public function header(string $name, $value): HttpRequest
    {
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = array();
        }
        $this->headers[$name][] = $value;

        return $this;
    }
public function header ( string $ name , $ value ) : HttpRequest { if ( ! array_key_exists ( $ name , $ this -> headers ) ) { $ this -> headers [ $ name ] = array ( ) ; } $ this -> headers [ $ name ] [ ] = $ value ; return $ this ; }
Adds a header to the request
@param string $name the name of the header
@param mixed $value the value for the header
@return HttpRequest
Adds a header to the request