vinod p
03/05/2024, 11:49 PMdocker run -it --rm -p 8080:8080 --name wiremock wiremock/wiremock:3.3.1 --verbose --global-response-templating
and my mapping:
{
"request": {
"method": "POST",
"urlPattern": {{url_match_pattern}}
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"request_id": "{{#assign 'ID'}}{{randomValue type='UUID'}}{{/assign}}{{ID}}"
}
},
"serveEventListeners": [
{
"name": "webhook",
"parameters": {
"method": "POST",
"url": "{{jsonPath originalRequest.query '$.callback_url'}}/{{request_id_two_str}}",
"body": "{{ID}}",
"delay": {
"type": "fixed",
"milliseconds": 5000
},
"headers": {
"Content-Type": "application/json"
}
}
}
]
}
i am setting the variabl "ID" in response and using it in serveEventListeners. If this does not work, is there any other way out ?vinod p
03/06/2024, 1:52 PMTom
03/06/2024, 1:54 PMvinod p
03/06/2024, 1:59 PMvinod p
03/06/2024, 1:59 PMvinod p
03/06/2024, 1:59 PMLee Turner
03/06/2024, 1:59 PMvinod p
03/06/2024, 2:00 PM