Why not a Client
trait?
#2486
-
This is probably my lack of Rust knowledge showing, but I noticed that Why not define a Wouldn't this also make it possible for 3rd-party crates to implement alternative clients? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The trait I recommend people use is from |
Beta Was this translation helpful? Give feedback.
-
@seanmonstar I think I was confused before. After reading up on What I'm trying to accomplish is actually the opposite. I'd like to be able to provide reqwest with a For a bit more context, I'm trying to get reqwest to run in |
Beta Was this translation helpful? Give feedback.
The trait I recommend people use is from
tower::Service
, which is implemented forClient
: https://docs.rs/reqwest/latest/reqwest/struct.Client.html#impl-Service%3CRequest%3E-for-Client