Closed 987Nabil closed 1 month ago
/bounty $250
/attempt #2957
with your implementation plan/claim #2957
in the PR body to claim the bountyThank you for contributing to zio/zio-http!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @kyri-petrou | Aug 7, 2024, 2:05:04 PM | #3008 |
/attempt #2957
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@kyri-petrou | 23 ZIO bounties + 2 bounties from 1 project |
Scala, Python, Shell & more |
Cancel attempt |
🎉🎈 @kyri-petrou has been awarded $250! 🎈🎊
Currently the Client requires a scope to close some kinds of bodies. The user has to wrap his code in
ZIO.scoped
to avoid memory leaks (which is also not documented well). From a users perspective, this is not needed most of the time. He probably just wants to handle the body directly and clean up the request. We should have a simpler API that does not require an explicit scope. We can let the user handover a function, that handles the response and after its execution we just clean up for the user.This should not replace the current more powerful API, but should be promoted as the default in documentation. For the current docs, we need to move away from using the global scope and should change most examples to this new API.
cc @kyri-petrou