PrefersJsonResponses
class PrefersJsonResponses (View source)
Methods
bool
acceptHeaderIsBroad(string|null $accept)
Determine if the given "Accept" header value is broad enough to be treated as JSON.
Details
protected bool
acceptHeaderIsBroad(string|null $accept)
Determine if the given "Accept" header value is broad enough to be treated as JSON.
The header is broad when it's missing or every media-type listed is wildcard ("\/" or "application/*").
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.