Skip to content

Kirby 4.1.2

$visitor->prefersJson()

Returns true if the visitor prefers a JSON response over an HTML response based on the Accept request header

$visitor->prefersJson(): bool

Return type

bool

Parent class

Kirby\Http\Visitor