Closed 987Nabil closed 1 month ago
/bounty $150
/attempt #2992
with your implementation plan/claim #2992
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 |
---|---|---|
🟢 @987Nabil | #3000 |
🎉🎈 @987Nabil has been awarded $150! 🎈🎊
In https://github.com/zio/zio-http/pull/2991 I modified the TextBinaryCodec, so it works for Records with exactly one field. This is used in query codec, but only works if the user gives the query param name. To improve this, we should add that one can define a case class and the query codec looks for query params that fit all field names.
The goal is to be able to define
HttpCodec.query[Params]
wherecase class Params(perPage: Int, page: Int)
to read two query params namedperPage
andpage
, for example.