webhook url from request body escaping special chars

98 views
Skip to first unread message

Bala GR (Bala)

unread,
Dec 15, 2022, 4:54:40 PM12/15/22
to wiremock-user
Hi, I'm trying to use webhooks with wiremock and substituting the url from the in postServeActions from the requestbody when the URL contains special chars like "="
ex: https://<hostname>/endpoint>/12345== the special char = gets translated to  https://<hostname>/endpoint>/12345&#x3D;&#x3D;

how to get rid of this problem, any help is appreciated.

wiremock stub:
{
  "request": {
    "urlPath": "/trigger-webhook",
    "method": "POST"
  },
  "response": {
    "status": 200
  },
  "postServeActions": [
    {
      "name": "webhook",
      "parameters": {
        "method": "POST",
        "url": "'{{jsonPath originalRequest.body '$.callbackUrl'}}'",
        "headers": {
          "Content-Type": "application/json; charset=utf-8",
        },
        "body": "{"blah":"blah"}",
        "delay": {
          "type": "fixed",
          "milliseconds": 1
        }
      }
    }
  ]
}


thanks,
Bala
Reply all
Reply to author
Forward
0 new messages