Skip to main content
The Accepts Helper provides content negotiation functionality based on HTTP Accept headers.

Import

Functions

accepts()

Determine the best match for the given Accept header.
Context
required
The context object
string | string[]
required
The content type(s) to match against
string | null
The best matching content type or null if no match
Example

Advanced Usage