mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #262] 400 Bad request on webhook for missing double-inverted commas #194
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#194
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 22, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/262
In the
Request Bodyfor Webhook intergrations, i added -This renders a
400 - bad requeston my express server. On trying out a few other ideas, i realised that not addingmessageas"message"did that.It works if add the double inverted commas -
Image for reference -
Is this intentional? Do you think the Object key without double inverted commas can be made to work please?
@cuu508 commented on GitHub (Jun 22, 2019):
I'm not sure I understand what the issue is.
Did Healthchecks send a payload that looks different from what you had entered in webhook configuration?
@ktkaushik commented on GitHub (Jun 22, 2019):
It just gave bad request which would mean that the payload is not JSON.
Basically, if i didn't put double inverted commas in the key of the
Request bodythen it's not a JSON payload that i receive on my webhook deeming it asBad Request with 400 status code@cuu508 commented on GitHub (Jun 22, 2019):
Yep,
{ message: "$NAME went $STATUS" }is indeed not a valid JSON document.Healthchecks doesn't do any special formatting on the POST body: whatever you put there is what gets sent. You could post JSON, XML, just a plain text string etc.
@ktkaushik commented on GitHub (Jun 23, 2019):
Cool. Thanks @cuu508