Skip to main content

negotiate_graph_format

Function negotiate_graph_format 

Source
pub fn negotiate_graph_format(
    accept: Option<&str>,
) -> Result<RdfFormat, ApiError>
Expand description

Pick Turtle, N-Triples, TriG, N-Quads, RDF/XML, or JSON-LD from an Accept header; default Turtle.

Same rules as negotiate_results_format: first acceptable entry wins, parameters ignored, wildcards map to a producible format (Turtle for */* / text/*, RDF/XML for application/*), and an Accept listing only unproducible media types is a 406.