flawless-http 1.0.0-beta.3

HTTP client for https://flawless.dev.
Documentation
//! A collection of out-of-the-box supported transport protocols.

pub mod flawless;

use crate::{Config, Error, Response};

/// Performs the HTTP call over the "wire".
///
/// This trait works on a very high level of abstraction and leaves it completely up to the implementer
/// to provide their own "wire" protocol over which the HTTP request is sent.
pub trait HTTPTransport {
    /// Perform an HTTP request.
    fn send(
        self,
        config: Config,
        method: String,
        url: String,
        headers: Vec<(String, String)>,
        body: Vec<u8>,
    ) -> Result<Response, Error>;
}