src/Leevel/Http/Request.php
public function isRealAcceptJson(): bool
    {
        $accept = $this->headers->get('ACCEPT');

        if (!$accept) {
            return false;
        }

        foreach (['/json', '+json'] as $item) {
            if (false !== strpos($accept, $item)) {
                return true;
            }
        }

        return false;
    }
public function isRealAcceptJson(): bool
    {
        $accept = $this->headers->get('ACCEPT');

        if (!$accept) {
            return false;
        }

        foreach (['/json', '+json'] as $item) {
            if (false !== strpos($accept, $item)) {
                return true;
            }
        }

        return false;
    }
是否为接受 json 请求真实.

@return bool