diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts index ff40414339..59279b4de6 100644 --- a/packages/plugin-core/src/index.ts +++ b/packages/plugin-core/src/index.ts @@ -151,14 +151,14 @@ const methods = wrapper({ }), webhook: ({ config, data, functions, type, trigger }) => { - const headers: Record = { - 'Content-Type': 'application/json', - }; + const headers: Record = {}; if (config.headerName && config.headerValue) { headers[config.headerName] = config.headerValue; } + headers['Content-Type'] = 'application/json'; + functions.httpRequest(config.url, { method: config.method ?? 'POST', body: JSON.stringify({