Skip to content

Kirby 4.4.1

$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