[PR #140] [MERGED] Adding Content-Type header to Webhook integrations #899

Closed
opened 2026-02-25 23:44:04 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: master


📝 Commits (8)

  • 0ea5927 Adding Content-Type header to Webhook integrations to work correctly with
  • fdf011a Update Webhook unit tests to use added Content-Type value.
  • 08ac09e Adding additional notify tests to improve coverage.
  • ee0df8b Fixed issue with Transport test
  • 05c84d7 Add support for arbitrary headers using a JSON body for webhooks.
  • 077bc45 Sorting keys on Webhook JSON value for consistent unit testing.
  • 5781ddf Created an improved interface for arbitrary headers and simplified
  • 602ad1d Improved 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, $NAME and $STATUS


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/healthchecks/healthchecks/pull/140 **Author:** [@someposer](https://github.com/someposer) **Created:** 11/3/2017 **Status:** ✅ Merged **Merged:** 11/10/2017 **Merged by:** [@cuu508](https://github.com/cuu508) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (8) - [`0ea5927`](https://github.com/healthchecks/healthchecks/commit/0ea5927b6a1064a343c2f3775b9d65aa0b601882) Adding Content-Type header to Webhook integrations to work correctly with - [`fdf011a`](https://github.com/healthchecks/healthchecks/commit/fdf011aa254480ba91a799f4825e5d6cc013d8a6) Update Webhook unit tests to use added Content-Type value. - [`08ac09e`](https://github.com/healthchecks/healthchecks/commit/08ac09ea937c06bcdbbcab310f2ab4f4cf219a29) Adding additional notify tests to improve coverage. - [`ee0df8b`](https://github.com/healthchecks/healthchecks/commit/ee0df8be95834eb494f854d84db26fb1b8ede92d) Fixed issue with Transport test - [`05c84d7`](https://github.com/healthchecks/healthchecks/commit/05c84d7976e47ac7dd83b313d1ce22548fb75811) Add support for arbitrary headers using a JSON body for webhooks. - [`077bc45`](https://github.com/healthchecks/healthchecks/commit/077bc45b12c7ae2a32d60072e0a1cf13f22812e7) Sorting keys on Webhook JSON value for consistent unit testing. - [`5781ddf`](https://github.com/healthchecks/healthchecks/commit/5781ddfe4dccc3cb05cf35413e7d7c3ce8efb1f5) Created an improved interface for arbitrary headers and simplified - [`602ad1d`](https://github.com/healthchecks/healthchecks/commit/602ad1dea81f457fe506718fb8bad9a676009b65) Improved handling of webhook header values when form has errors ### 📊 Changes **10 files changed** (+214 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 Description Adding Content-Type header to Webhook integrations to work correctly with services like [IFTTT Maker Webhooks](https://ifttt.com/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, `$NAME` and `$STATUS` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:44:04 +03:00
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#899
No description provided.