Is it possible to map the method name to a header with a int-http:inbound-gateway? for example:
<int-http:inbound-gateway request-channel="requests" reply-channel="replies"
supported-moethds="GET,PUT"
path="/user">
<int-http:header name="requestMethod" expression="#requestMethod"/>
</int-http:inbound-gateway>
<!-- ... -->
<int:header-value-router input-channel="requests" header-name="requestMethod>
<int:mapping value="GET" channel="getUserRequests"/>
<int:mapping value="PUT" channel="addUserRequests"/>
</int:header-value-router>
Furthermore, I see examples that utilize #requestParams, but the javadoc for 2.1 mentions #queryParameters, and I don’t see documentation for either of these in the official documentation page. Do you guys know a good resource that describes not only how SpEL parses expressions but what fields are available to use with it? All I can tell is I have headers, payload, #pathVariables, and maybe #requestParams or #queryParams, along with any other @beans I have defined in the current context.
Thanks in advance!
That method is always mapped to a header
The javadoc is wrong. The two additional variables are #requestParams and #pathVariables.