pub fn negotiate_accept(
header_value: Option<&HeaderValue>,
) -> Result<OutputFormat, HttpError>Expand description
Negotiates the Accept header for the /conversion endpoint.
Returns OutputFormat::Oxa for Accept: application/vnd.oxa+json, and
OutputFormat::Blocknote for the BlockNote MIMEs, application/*, */*, and
missing Accept. Wildcards default to BlockNote for back-compat with pre-oxa
clients. When Accept lists multiple types, the first whose bare MIME matches a
supported value wins (case-insensitive); q=... is stripped.
ยงErrors
Returns HttpError::NotAcceptable if no acceptable MIME type found.