GH-864 Add support for carying HTTP request parameters in Message headers
Resolves #864
This commit is contained in:
@@ -650,6 +650,13 @@ When POSTing text the response format might be different with Spring Boot 2.0 an
|
||||
|
||||
See <<Testing Functional Applications>> to see the details and example on how to test such application.
|
||||
|
||||
==== HTTP Request Parameters
|
||||
As you have noticed from the previous table, you can pass an argument to a function as path variable (i.e., `/{function}/{item}`).
|
||||
For example, `http://localhost:8080/uppercase/foo` will result in calling `uppercase` function with its input parameter being `foo`.
|
||||
|
||||
While this is the recommended approach and the one that fits most use cases cases, there are times when you have to deal with HTTP request parameters.
|
||||
The framework will treat HTTP request parameters similar to the HTTP headers by storing them in `Message` headers under the header key `http_request_param`
|
||||
with its value being a `Map` of request parameters, so in order to access them your function input signature should accept `Message` type (e.g., `Function<Message<String>, String>`). For convenience we provide `HeaderUtils.HTTP_REQUEST_PARAM` constant.
|
||||
|
||||
=== Function Mapping rules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user