mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[PR #140] [MERGED] Adding Content-Type header to Webhook integrations #899
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#899
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?
📋 Pull Request Information
Original PR: https://github.com/healthchecks/healthchecks/pull/140
Author: @someposer
Created: 11/3/2017
Status: ✅ Merged
Merged: 11/10/2017
Merged by: @cuu508
Base:
master← Head:master📝 Commits (8)
0ea5927Adding Content-Type header to Webhook integrations to work correctly withfdf011aUpdate Webhook unit tests to use added Content-Type value.08ac09eAdding additional notify tests to improve coverage.ee0df8bFixed issue with Transport test05c84d7Add support for arbitrary headers using a JSON body for webhooks.077bc45Sorting keys on Webhook JSON value for consistent unit testing.5781ddfCreated an improved interface for arbitrary headers and simplified602ad1dImproved handling of webhook header values when form has errors📊 Changes
10 files changed (+214 additions, -42 deletions)
View changed files
📝
hc/api/models.py(+30 -8)📝
hc/api/tests/test_notify.py(+40 -0)📝
hc/api/transports.py(+8 -5)📝
hc/front/forms.py(+18 -4)📝
hc/front/tests/test_add_webhook.py(+20 -9)📝
hc/front/views.py(+4 -1)➕
static/js/webhook.js(+29 -0)📝
templates/front/channels.html(+10 -4)📝
templates/front/log.html(+1 -1)📝
templates/integrations/add_webhook.html(+54 -10)📄 Description
Adding Content-Type header to Webhook integrations to work correctly with services like IFTTT Maker Webhooks which require a specific content type, like application/json.
If the content-type is not provided, the post data is not parsed by IFTTT, which prevents the ability to use variables like,
$NAMEand$STATUS🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.