KNO-10168: Document default Content-Type header for fetch and webhook steps#1180
Open
KNO-10168: Document default Content-Type header for fetch and webhook steps#1180
Conversation
- Add section explaining default Content-Type: application/json header - Document that users can override the default header - Clarify that no header is added for GET requests or empty bodies - Apply documentation to both fetch function and webhook channel pages Co-Authored-By: Chris Bell <cjbell1988@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
cellomatt
approved these changes
Oct 17, 2025
Contributor
cellomatt
left a comment
There was a problem hiding this comment.
Awesome!
Should we also document the User-Agent: Knock/1.0 (https://docs.knock.app/http-fetch-function) header?
(I'm not sure how that looks on a webhook send, actually)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds documentation for the new default
Content-Type: application/jsonheader that Knock automatically adds to HTTP fetch steps and webhook channel steps when request bodies are present (implemented in https://github.com/knocklabs/switchboard/pull/4793).What changed:
content/designing-workflows/fetch-function.mdx)content/integrations/webhook/overview.mdx)Why:
Users need to understand that Knock now automatically adds standards-compliant Content-Type headers to requests with bodies, and that they can override this behavior if needed.
Key points documented:
Content-Type: application/jsonis automatically added when a request body is presentContent-TypeheaderHuman review checklist
Tasks
Session info:
Note
Documents automatic
Content-Type: application/jsonfor requests with bodies in fetch and webhook steps, including override support and no default for GET/empty body.content/designing-workflows/fetch-function.mdx:Content-Type: application/jsonwhen a request body is present, ability to override via explicit header, and no default forGET/no-body.content/integrations/webhook/overview.mdx:GET/no-body.Written by Cursor Bugbot for commit 6996ad5. This will update automatically on new commits. Configure here.