src/Leevel/Http/Response.php
public function withHeaders(array $headers): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        foreach ($headers as $key => $value) {
            $this->headers->set($key, $value);
        }

        return $this;
    }
public function withHeaders(array $headers): IResponse
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        foreach ($headers as $key => $value) {
            $this->headers->set($key, $value);
        }

        return $this;
    }
批量设置响应头.

@param array $headers

@return $this