src/Leevel/Http/Request.php
public function isRealJson(): bool
    {
        $contentType = $this->headers->get('CONTENT_TYPE');

        if (!$contentType) {
            return false;
        }

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

        return false;
    }
public function isRealJson(): bool
    {
        $contentType = $this->headers->get('CONTENT_TYPE');

        if (!$contentType) {
            return false;
        }

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

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

@return bool