https://linen.dev logo
#help
Title
# help
s

Shaikh Mansur

08/25/2023, 8:54 AM
hey folks , i am using wirmock standlone server  with postman ,  in mapping file i have 2 json file   and in my Json i am using postServerAction . {     "request": {         "urlPath": "/",         "method": "POST"     },     "response": {         "status": 200, "headers": { "Content-Type": "application/json" }, "jsonBody": { "responseId": "123456" }     },     "postServeActions": [         {             "name": "webhook",             "parameters": {                 "method": "POST",                 "url": "/",                 "headers": {                     "Content-Type": "application/json"                 },                 "body": "{ \"requestId\": \"{{jsonPath request.body '$.requestId'}}\" }", "response": { "jsonBody": { "message": "Callback request processed successfully" } } }         }     ] } when i am hitting the endpoint then getting response  as responseId-12345 i am not confirmed my callback is hitting or not,how can i verify ?
l

Lee Turner

08/25/2023, 9:13 AM
Hi, a couple of things jump out - In the examples, the
url
for the webhook is a fully qualified url so might be worth providing the full url if you can. The examples I was looking at are here - https://wiremock.org/3.x/docs/webhooks-and-callbacks/ Also, you have a
response
element with the
jsonBody
element within it. I am not sure that is needed/allowed in the webhook postServeAction
Also, the API I help build at work uses callbacks quite extensively (I used the same setup as you for some local testing we were doing using Wiremock and the webhook extension) I put together a little utility to allow us to get some visibility of those callbacks. I used it when I was setting up the callbacks from wiremock. Might be useful here - https://github.com/leeturner/callback-logger
5 Views