xmpp-httpx - v0.11.0
    Preparing search index...

    Interface AcceptEntry

    Content negotiation for handlers: picking a representation from the requester's Accept header.

    A gateway serving both HTML and JSON needs this, and the alternative — headers.get("accept")?.includes("json") — quietly gets q-values, wildcards and ordering wrong. Pure and browser-safe.

    interface AcceptEntry {
        q: number;
        type: string;
    }
    Index
    q: number

    Quality factor, 0–1. Entries with q=0 are refusals.

    type: string

    Media type as written, lowercased: "text/html", "text/", "/*".