kinetex - v1.0.0-rc.1
    Preparing search index...

    Function negotiateContentType

    • Content negotiation: pick the best match from the available content types given the client's Accept header, respecting q-factors and wildcards.

      Parameters

      • acceptHeader: string

        Raw Accept header value

      • available: string[]

        Sorted list of content types the server can serve

      Returns string | null

      Best matching content type, or null if none match