https://opendal.apache.org/ logo
Hi, I'm curious what is the proper way
# general
c
Hi, I'm curious what is the proper way of using HttpClientLayer with a custom client that impls HttpFetch? It seems the HttpClientLayer::new() takes in only an HttpClient?
Oh do I have to create a new
Copy code
custom_client = HttpClient::with(my_custom_fetch_impl)
and pass that to the HttpClientLayer::new
e
Yes, correct. HttpFetch itself is quite simple but de-facto reqwest.
For example, this is async interface and you can't use ureq.
Back to your questions, 2 things: 1. implement HttpFetch for your chosen client. reqwest is supported as the example. 2. Then to use your code.