-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce dynamic path for HTTP Call
Let's say that we want to call an endpoint using a different value on the path for each record, with this implementation we can easily do that. Using a placeholder we can take data from the record a mutate the path dynamically. Example We have a list of producs: ``` [ { "productId": 1 }, { "productId": 2 }, { "productId": 3 }, { "productId": 4 } ] ``` We can receive the info about each product by calling '/products/<id of the product>' To do that we use this config: ``` config: api: pruduct-api path: /products/${value.productId} topic: error ``` If the value is not there, the call will fail, and the record will be routed to the error topic. Signed-off-by: Stefano Guerrini <[email protected]>
- Loading branch information
Stefano Guerrini
committed
Aug 25, 2022
1 parent
c9ba644
commit 1262275
Showing
5 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters