flaneur2020 commented on code in PR #5184:
URL: https://github.com/apache/opendal/pull/5184#discussion_r1802644471


##########
core/src/raw/http_util/client.rs:
##########
@@ -78,6 +81,34 @@ impl HttpClient {
 
     /// Fetch a request in async way.
     pub async fn fetch(&self, req: Request<Buffer>) -> 
Result<Response<HttpBody>> {
+        self.fetcher.fetch(req).await
+    }
+}
+
+#[async_trait::async_trait]
+pub trait HttpFetch: Send + Sync {
+    /// Fetch a request in async way.
+    async fn fetch(&self, req: Request<Buffer>) -> Result<Response<HttpBody>>;
+}
+
+#[derive(Clone)]
+struct ReqwestHttpFetcher {

Review Comment:
   can we implement trait for other crate's struct? 😲



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to