oxigraph/sparql/http/
dummy.rs1use std::io::{Empty, Error, ErrorKind, Result};
4use std::time::Duration;
5
6#[derive(Clone)]
7pub struct Client;
8
9impl Client {
10 pub fn new(_timeout: Option<Duration>, _redirection_limit: usize) -> Self {
11 Self
12 }
13
14 #[allow(clippy::unused_self)]
15 pub fn get(&self, _url: &str, _accept: &'static str) -> Result<(String, Empty)> {
16 Err(Error::new(
17 ErrorKind::Unsupported,
18 "HTTP client is not available. Enable the feature 'http-client'",
19 ))
20 }
21
22 #[allow(clippy::unused_self, clippy::needless_pass_by_value)]
23 pub fn post(
24 &self,
25 _url: &str,
26 _payload: Vec<u8>,
27 _content_type: &'static str,
28 _accept: &'static str,
29 ) -> Result<(String, Empty)> {
30 Err(Error::new(
31 ErrorKind::Unsupported,
32 "HTTP client is not available. Enable the feature 'http-client'",
33 ))
34 }
35}