Providing HTTP query parameters
HTTP requests can contain request parameters, which are encoded at the end of the URL in the following form:
/path?key=value&key=value
The request parameters can be provided as part of the metadata.http.path element in a request. In this case, however, they must be correctly encoded within the request.
A better solution is to provide the request parameters as part of the metadata.http.queryString element. This is a map of key/value pairs which will be correctly HTTP encoded and appended to the end of the metadata.http.path in the request. The parameters can either be set as a map directly out of the payload, or they can be set individually via the Mapper codec. For example:
- mapperCodec:
Request:
towardsTransport:
mapFrom:
# set one query parameter individually
- metadata.http.queryString.param: payload.paramValue
# alternatively set all query parameters from an EPL dictionary
- metadata.http.queryString: payload.parameters