Skip to main content

docspec_http/
format.rs

1//! MIME type and HTTP header constants for the conversion API.
2
3/// Cache-Control header value applied to all responses.
4pub const CACHE_CONTROL_VALUE: &str = "max-age=0, private, must-revalidate";
5
6/// Health endpoint response body.
7pub const HEALTH_BODY: &str = "Healthy.";
8
9/// The MIME type accepted as request body.
10pub const INPUT_MIME_MARKDOWN: &str = "text/markdown";
11
12/// The MIME type accepted as request body for HTML input.
13pub const INPUT_MIME_HTML: &str = "text/html";
14
15/// MIME type for DOCX documents. Strict — must be sent verbatim with no parameters.
16pub const INPUT_MIME_DOCX_PRIMARY: &str =
17    "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
18
19/// Accepted alias for the output MIME type (input-only; server always returns primary).
20pub const OUTPUT_MIME_ALIAS: &str = "application/vnd.blocknote+json";
21
22/// The primary output MIME type returned on success.
23pub const OUTPUT_MIME_PRIMARY: &str = "application/vnd.docspec.blocknote+json";
24
25/// The primary HTML output MIME type returned when the HTML writer is selected.
26pub const OUTPUT_MIME_HTML_PRIMARY: &str = "text/html";
27
28/// The primary `oxa.dev` output MIME type returned when the `oxa.dev` writer is selected.
29pub const OUTPUT_MIME_OXA_PRIMARY: &str = "application/vnd.oxa+json";
30
31/// The primary Pandoc native output MIME type returned when the Pandoc native writer is selected.
32pub const OUTPUT_MIME_PANDOC_NATIVE_PRIMARY: &str = "application/vnd.pandoc.native";