Does bodyWithFile work for webhook responses ? #428

Closed
opened 2025-12-29 15:23:36 +01:00 by adam · 1 comment
Owner

Originally created by @balalnx16 on GitHub (Jul 14, 2022).

when I try to generate a webhook response using the following mapping, the body is not delivered to the receiving service, Is this a bug

{
    "request": {
        "urlPath": "/something-async",
        "method": "POST"
    },
    "response": {
        "status": 200
    },
    "postServeActions": [
        {
            "name": "webhook",
            "parameters": {
                "method": "POST",
                "url": "https://example.webhook.com/reciever",
                "headers": {
                    "Content-Type": "application/json",
                },
                "bodyFileName": "sample.json"
            }
        }
    ]
}
Originally created by @balalnx16 on GitHub (Jul 14, 2022). when I try to generate a webhook response using the following mapping, the body is not delivered to the receiving service, Is this a bug ``` json { "request": { "urlPath": "/something-async", "method": "POST" }, "response": { "status": 200 }, "postServeActions": [ { "name": "webhook", "parameters": { "method": "POST", "url": "https://example.webhook.com/reciever", "headers": { "Content-Type": "application/json", }, "bodyFileName": "sample.json" } } ] } ```
adam added the question label 2025-12-29 15:23:36 +01:00
adam closed this issue 2025-12-29 15:23:36 +01:00
Author
Owner

@StefH commented on GitHub (Jul 14, 2022):

The example json you defined, is from WireMock.Org, not this project.

See this page how to use webhooks:
https://github.com/WireMock-Net/WireMock.Net/wiki/Webhook

@StefH commented on GitHub (Jul 14, 2022): The example json you defined, is from WireMock.Org, not this project. See this page how to use webhooks: https://github.com/WireMock-Net/WireMock.Net/wiki/Webhook
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#428