Oxigraph server: use OxHTTP server

pull/171/head
Tpt 3 years ago
parent 083c16eaa9
commit 73f04b2baf
  1. 6
      lib/src/sparql/http/simple.rs
  2. 6
      server/Cargo.toml
  3. 1363
      server/src/main.rs

@ -10,9 +10,11 @@ pub struct Client {
impl Client { impl Client {
pub fn new(timeout: Option<Duration>) -> Self { pub fn new(timeout: Option<Duration>) -> Self {
let mut client = oxhttp::Client::new(); let mut client = oxhttp::Client::new();
client.set_global_timeout(timeout); if let Some(timeout) = timeout {
client.set_global_timeout(timeout);
}
client client
.set_user_agent(concat!("Oxigraph/", env!("CARGO_PKG_VERSION")).into()) .set_user_agent(concat!("Oxigraph/", env!("CARGO_PKG_VERSION")))
.unwrap(); .unwrap();
Self { client } Self { client }
} }

@ -12,11 +12,9 @@ SPARQL server based on Oxigraph
edition = "2018" edition = "2018"
[dependencies] [dependencies]
async-std = { version = "1", features = ["attributes"] } oxhttp = { git = "https://github.com/oxigraph/oxhttp", branch = "master" }
async-h1 = "2"
clap = "2" clap = "2"
http-types = "2" oxigraph = { version = "0.3.0-dev", path = "../lib", features = ["http_client"] }
oxigraph = { version = "0.3.0-dev", path="../lib", features = ["http_client"] }
rand = "0.8" rand = "0.8"
url = "2" url = "2"
oxiri = "0.1" oxiri = "0.1"

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save