Rust implementation of NextGraph, a Decentralized and local-first web 3.0 ecosystem
https://nextgraph.org
byzantine-fault-tolerancecrdtsdappsdecentralizede2eeeventual-consistencyjson-ldlocal-firstmarkdownocapoffline-firstp2pp2p-networkprivacy-protectionrdfrich-text-editorself-hostedsemantic-websparqlweb3collaboration
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
913 B
34 lines
913 B
//! Simple HTTP client
|
|
|
|
use std::io::{Empty, Error, ErrorKind, Result};
|
|
use std::time::Duration;
|
|
|
|
pub struct Client;
|
|
|
|
impl Client {
|
|
pub fn new(_timeout: Option<Duration>, _redirection_limit: usize) -> Self {
|
|
Self
|
|
}
|
|
|
|
#[allow(clippy::unused_self)]
|
|
pub fn get(&self, _url: &str, _accept: &'static str) -> Result<(String, Empty)> {
|
|
Err(Error::new(
|
|
ErrorKind::Unsupported,
|
|
"HTTP client is not available. Enable the feature 'http-client'",
|
|
))
|
|
}
|
|
|
|
#[allow(clippy::unused_self, clippy::needless_pass_by_value)]
|
|
pub fn post(
|
|
&self,
|
|
_url: &str,
|
|
_payload: Vec<u8>,
|
|
_content_type: &'static str,
|
|
_accept: &'static str,
|
|
) -> Result<(String, Empty)> {
|
|
Err(Error::new(
|
|
ErrorKind::Unsupported,
|
|
"HTTP client is not available. Enable the feature 'http-client'",
|
|
))
|
|
}
|
|
}
|
|
|