use async_trait::async_trait;
use bytes::Bytes;
use thiserror::Error;
#[derive(Debug, Clone, Error)]
pub enum HttpError {
#[error("http request failed: {0}")]
Transport(String),
}
#[async_trait]
pub trait HttpClient: Send + Sync {
async fn send(&self, request: http::Request<Bytes>)
-> Result<http::Response<Bytes>, HttpError>;
}