use reqwest::{Request, Response};
use std::{future::Future, pin::Pin};
pub trait ODataHttpClient {
type Response: Future<Output = Result<Response, reqwest::Error>>;
fn execute_request(&self, request: Request) -> Self::Response;
}
impl ODataHttpClient for reqwest::Client {
type Response = Pin<Box<dyn Future<Output = Result<Response, reqwest::Error>>>>;
fn execute_request(&self, request: Request) -> Self::Response {
Box::pin(self.execute(request))
}
}