Consider adding overloaded methods to MockHttpServletRequestBuilder for headers and params #32918
Labels
in: test
Issues in the test module
status: declined
A suggestion or change that we don't feel we should currently apply
See #32913 and this prototype work by @snicoll for background.
In the example above, it's quite common to see code like this:
Repeating the
.param
call is quite noisy, and it would be nice if you could do something similar toMap.of(...)
:Same with the
header
call.Both headers and params are multi-value maps, so it's perhaps not entirely straightforward. Perhaps an
instanceof
check is also needed to support something like:The text was updated successfully, but these errors were encountered: