Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions content/designing-workflows/fetch-function.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ Aside from the request method selector, each of the above fields is a Liquid-com

See the [Knock template editor reference](/send-notifications/designing-workflows/template-editor) for detailed information on working with Liquid templates in Knock.

### Default headers

When a fetch function includes a request body, Knock automatically adds a `Content-Type: application/json` header to the request. This ensures your endpoint receives properly formatted JSON data with the correct content type.

You can override this default by explicitly setting your own `Content-Type` header in the headers field. This allows you to use alternative content types (such as `application/xml` or `text/plain`) when needed for your specific use case.

For `GET` requests or requests without a body, no default `Content-Type` header is added.

## Request execution

When executing the request for a fetch function, Knock expects the following from your service:
Expand Down
8 changes: 8 additions & 0 deletions content/integrations/webhook/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ To learn how to build a webhook request in detail, you can read [our fetch funct
}
/>

### Default headers

When a webhook request includes a request body, Knock automatically adds a `Content-Type: application/json` header to the request. This ensures your endpoint receives properly formatted JSON data with the correct content type.

You can override this default by explicitly setting your own `Content-Type` header in the headers field. This allows you to use alternative content types when needed for your specific use case.

For `GET` requests or requests without a body, no default `Content-Type` header is added.

## Use your webhook channel

Once your webhook channel is configured and you've built its webhook request, you're ready to add your webhook channel to a workflow.
Expand Down
Loading