mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #259] No POST data to be found for webhook integration #190
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@ktkaushik commented on GitHub (Jun 6, 2019):
Please let me know if you would need any details. Thanks
@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:
If you send POST requests to the Node.js server manually with e.g. curl, does the POST body show up then?
@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?
@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.
@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.
@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
@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
$NAME went down. Current status is $STATUS(key is the string){message: $NAME went down. Current status is $STATUS }However, when i use POSTMAN i get the body perfectly in JS Object meaning that it could parse well.
You think i should raise this as a separate issue?
@cuu508 commented on GitHub (Jun 6, 2019):
If the endpoint can handle JSON payload, try using body:
And headers:
@ktkaushik commented on GitHub (Jun 6, 2019):
Let me try this in a bit
@ktkaushik commented on GitHub (Jun 6, 2019):
Yup, the JSON payload worked. Thanks @cuu508