I am migrating to a RestController from an old lib implemented over Netty.
I used to have an ability in the controller to get the entire Request object and pass it down. Than later logic layers take whatever they need from the headers and query params.
dosomething(request: Request, someQueryParam: String) {
if(someQueryParam!=null) { doAnotherThing(request) }
}
doAnotherThing(request: Request) { .. use more query params and headers ..}
Imagine this has numerous params and pass through more classes. How will I be able to do it now without exposing the whole list of params used in the bottom, on every endpoint signature? (and without having to move my api users to use requestBody)