-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .resourceUsingClient to HttpClient backends. #1619
Conversation
Sure, sounds good :) Maybe we could add similar methods to other HttpClient backend variants (where it makes sense) |
…ixBackend.resourceUsingClient.
618b130
to
827d314
Compare
I added methods to 2 other client variants. Surprisingly, ZIO backend already contains |
@kamilkloch Yes, in ZIO the equivalent would be |
|
Thank you :) |
Do we want to update the documentstion as well, or leave out this flavor? |
Ah the docs - yes of course :) |
Rationale:
I am trying to migrate away from the deprecated
AsyncHttpClientFs2Backend
and am struggling to reproduce the functionality withsttp/effects/fs2/src/main/scalajvm/sttp/client3/httpclient/fs2/HttpClientFs2Backend.scala
Line 96 in b387e2f
HttpClientFs2Backend.resource
has a default http client baked in,HttpClientFs2Backend.usingClient
has hard-coded flagcloseClient = false
. I am missing something akin toHttpClientFs2Backend.resourceUsingClient
, which would allow me to customize the client and at the same time get back the resource.