core/Request.php
public static function setHeader(string $name, string $value, bool $replace = true, $http_response_code = null)
    {
        $nameTemps = explode('-', $name);
        foreach ($nameTemps as &$n) {
            $n = ucfirst($n);
        }
        $name = join('-', $nameTemps);
        $string = $name . ':' . $value;
        if ($replace) {
            if ($http_response_code == null) {
                @header($string);
            } else {
                @header($string, $replace, $http_response_code);
            }
        } else {
            if ($http_response_code == null) {
                @header($string, false);
            } else {
                @header($string, false, $http_response_code);
            }
        }
    }
public static function setHeader(string $name, string $value, bool $replace = true, $http_response_code = null)
    {
        $nameTemps = explode('-', $name);
        foreach ($nameTemps as &$n) {
            $n = ucfirst($n);
        }
        $name = join('-', $nameTemps);
        $string = $name . ':' . $value;
        if ($replace) {
            if ($http_response_code == null) {
                @header($string);
            } else {
                @header($string, $replace, $http_response_code);
            }
        } else {
            if ($http_response_code == null) {
                @header($string, false);
            } else {
                @header($string, false, $http_response_code);
            }
        }
    }
设置请求头
@param string $name
@param string $value
@param bool $replace
@param null $http_response_code