Adds application/sparql-results+json to federated queries accept

pull/171/head
Tpt 3 years ago
parent c18281183a
commit b533163021
  1. 5
      lib/src/sparql/service.rs

@ -118,7 +118,10 @@ impl ServiceHandler for SimpleServiceHandler {
.method(Method::POST) .method(Method::POST)
.uri(service_name.as_str()) .uri(service_name.as_str())
.header(CONTENT_TYPE, "application/sparql-query") .header(CONTENT_TYPE, "application/sparql-query")
.header(ACCEPT, QueryResultsFormat::Xml.media_type()) .header(
ACCEPT,
"application/sparql-results+json, application/sparql-results+xml",
)
.header(USER_AGENT, concat!("Oxigraph/", env!("CARGO_PKG_VERSION"))) .header(USER_AGENT, concat!("Oxigraph/", env!("CARGO_PKG_VERSION")))
.body(Some(query.to_string().into_bytes())) .body(Some(query.to_string().into_bytes()))
.map_err(invalid_input_error)?; .map_err(invalid_input_error)?;

Loading…
Cancel
Save