src/Leevel/Http/Request.php
public function isJson(): bool
    {
        $field = static::VAR_JSON;

        if ($this->request->has($field) || $this->query->has($field)) {
            return true;
        }

        return $this->isRealJson();
    }
public function isJson(): bool
    {
        $field = static::VAR_JSON;

        if ($this->request->has($field) || $this->query->has($field)) {
            return true;
        }

        return $this->isRealJson();
    }
是否为 json 请求行为.

@return bool