[GH-ISSUE #259] No POST data to be found for webhook integration #190

Closed
opened 2026-02-25 23:41:31 +03:00 by kerem · 10 comments
Owner

Originally created by @ktkaushik on GitHub (Jun 6, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/259

I am using the webhook integration and i have the body setup but i don't see any data coming in on my Node.js server using Express.

I keep getting an empty object. Why could this be happening? Is my configuration incorrect?

Integrations - Healthchecks io 2019-06-06 11-48-37
Originally created by @ktkaushik on GitHub (Jun 6, 2019). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/259 I am using the webhook integration and i have the body setup but i don't see any data coming in on my Node.js server using Express. I keep getting an empty object. Why could this be happening? Is my configuration incorrect? <img width="631" alt="Integrations - Healthchecks io 2019-06-06 11-48-37" src="https://user-images.githubusercontent.com/877806/59011128-3f76f580-8851-11e9-90a4-5109c63b950a.png">
kerem closed this issue 2026-02-25 23:41:31 +03:00
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

Please let me know if you would need any details. Thanks

<!-- gh-comment-id:499364969 --> @ktkaushik commented on GitHub (Jun 6, 2019): Please let me know if you would need any details. Thanks
Author
Owner

@cuu508 commented on GitHub (Jun 6, 2019):

Tested POST data with a requestbin-type service and with a similar POST body as yours, and it seemed to work:

image

If you send POST requests to the Node.js server manually with e.g. curl, does the POST body show up then?

<!-- gh-comment-id:499375217 --> @cuu508 commented on GitHub (Jun 6, 2019): Tested POST data with a requestbin-type service and with a similar POST body as yours, and it seemed to work: ![image](https://user-images.githubusercontent.com/661859/59013250-37638980-8842-11e9-8821-6764516215fa.png) If you send POST requests to the Node.js server manually with e.g. curl, does the POST body show up then?
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

Yeah i have tested by sending it manually using Postman multiple times on the same webhook.

By any chance have you set any content type that perhaps Express is not able to parse?

<!-- gh-comment-id:499376264 --> @ktkaushik commented on GitHub (Jun 6, 2019): Yeah i have tested by sending it manually using Postman multiple times on the same webhook. By any chance have you set any content type that perhaps Express is not able to parse?
Author
Owner

@cuu508 commented on GitHub (Jun 6, 2019):

By default it doesn't set any content type. When adding the webhook integration, you can specify the request headers and set the Content-Type header explicitly.

<!-- gh-comment-id:499380204 --> @cuu508 commented on GitHub (Jun 6, 2019): By default it doesn't set any content type. When adding the webhook integration, you can specify the request headers and set the Content-Type header explicitly.
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

I can't seem to edit the webhook except for it's name. Seems like i will have to create a new one.

<!-- gh-comment-id:499381305 --> @ktkaushik commented on GitHub (Jun 6, 2019): I can't seem to edit the webhook except for it's name. Seems like i will have to create a new one.
Author
Owner

@cuu508 commented on GitHub (Jun 6, 2019):

Yeah. "allow editing existing webhooks" has been at the back of my mind for a while. Filed it just now: #260

<!-- gh-comment-id:499382042 --> @cuu508 commented on GitHub (Jun 6, 2019): Yeah. "allow editing existing webhooks" has been at the back of my mind for a while. Filed it just now: #260
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

@cuu508 Adding the header worked. Thanks.

It's parsing vaguely though for json and x-www-form-urlecoded

  1. $NAME went down. Current status is $STATUS (key is the string)
Body - { 'TEST went down. Current status is down': '' }
  1. {message: $NAME went down. Current status is $STATUS }
Body - { '{"message": "TEST went down"}': '' }

However, when i use POSTMAN i get the body perfectly in JS Object meaning that it could parse well.

Body for POSTMAN - {Subject: 'Test went down'}

image

You think i should raise this as a separate issue?

<!-- gh-comment-id:499388807 --> @ktkaushik commented on GitHub (Jun 6, 2019): @cuu508 Adding the header worked. Thanks. It's parsing vaguely though for json and x-www-form-urlecoded 1. ` $NAME went down. Current status is $STATUS ` (key is the string) ``` Body - { 'TEST went down. Current status is down': '' } ``` 2. `{message: $NAME went down. Current status is $STATUS }` ``` Body - { '{"message": "TEST went down"}': '' } ``` However, when i use POSTMAN i get the body perfectly in JS Object meaning that it could parse well. ``` Body for POSTMAN - {Subject: 'Test went down'} ``` ![image](https://user-images.githubusercontent.com/877806/59016037-fda07c00-885d-11e9-871e-3c36f654ed4f.png) You think i should raise this as a separate issue?
Author
Owner

@cuu508 commented on GitHub (Jun 6, 2019):

If the endpoint can handle JSON payload, try using body:

{"Subject": "$NAME went down"}

And headers:

Content-Type: application/json
<!-- gh-comment-id:499391354 --> @cuu508 commented on GitHub (Jun 6, 2019): If the endpoint can handle JSON payload, try using body: {"Subject": "$NAME went down"} And headers: Content-Type: application/json
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

Let me try this in a bit

<!-- gh-comment-id:499393048 --> @ktkaushik commented on GitHub (Jun 6, 2019): Let me try this in a bit
Author
Owner

@ktkaushik commented on GitHub (Jun 6, 2019):

Yup, the JSON payload worked. Thanks @cuu508

<!-- gh-comment-id:499408345 --> @ktkaushik commented on GitHub (Jun 6, 2019): Yup, the JSON payload worked. Thanks @cuu508
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#190
No description provided.