-
Notifications
You must be signed in to change notification settings - Fork 38.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support data binding from request headers #32676
Comments
Hi @kalgon, Thanks for creating this issue.
I have confirmed that to be the case. @rstoyanchev, is it intentional that |
This is regular data binding at work, but applied through constructor args. Note that the For data binding we've long supported using both request parameters and path variables. We can add headers to the map of values to bind from. |
This commit aligns Spring WebFlux with WebMvc in adding URI variables conditionally if not already in the map. The idea is that data binding is primarily through form data and query params, with URI variables, and request headers (to be implemented next) also made available but without shadowing existing values. See gh-32676
Affects: 6.1.5
A rest controller with the following method
will produce the following log when called with
/1?foo=FOO
:@PathVariable
and@RequestParam
are correctly used to instantiate the record but the@RequestHeader
remains null (although it works as a parameter of the controller method)The text was updated successfully, but these errors were encountered: