src/Exception/ExpectedException.php
public function headers($key = null, $value = null)
    {
        if (null === $value)
        {
            return $this->_response->headers($key);
        }

        $result = $this->_response->headers($key, $value);

        if ( ! $result instanceof Response)
        {
            return $result;
        }

        return $this;
    }
public function headers($key = null, $value = null)
    {
        if (null === $value)
        {
            return $this->_response->headers($key);
        }

        $result = $this->_response->headers($key, $value);

        if ( ! $result instanceof Response)
        {
            return $result;
        }

        return $this;
    }
设置header信息

@param  mixed  $key
@param  string $value
@return mixed