http4s / http4s-servlet

http4s-servlet support
Apache License 2.0
6 stars 5 forks source link

Customizing the conversion from servlet request to http4s request #173

Open asvanberg opened 1 year ago

asvanberg commented 1 year ago

It would be good if there was a way to adapt or extend the current request conversion which is hidden down in Http4sServlet if you want to extract additional attributes or populate the remote user for example.

rossabaker commented 1 year ago

This is a fair idea. Do you have a vision for how you'd like that API to appear?

asvanberg commented 1 year ago

If it was possible to pass a (HttpServletRequest, Request) => ParseResult[Request] or maybe allow effects and return F[ParseResult[Request]] to the builder/apply that would work well I think.