Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Content-Type header to Form Webhook #4509

Open
AndreasCaldewei opened this issue Jan 28, 2025 · 0 comments
Open

Add Content-Type header to Form Webhook #4509

AndreasCaldewei opened this issue Jan 28, 2025 · 0 comments

Comments

@AndreasCaldewei
Copy link

AndreasCaldewei commented Jan 28, 2025

Is your feature request related to a problem? Please describe.

Currently, there is no option to set headers on the Form Webhook. I need to set a Content-Type header on the request to properly integrate with a CRM.

const response = await fetch(url, {
method: "POST",
body: JSON.stringify({
...data,
meta: {
submittedOn: format(new Date(meta.submittedOn), "yyyy-MM-dd HH:mm:ss"),
// We don't spread the full `meta` object in order to ensure sensitive data
// doesn't end up being included (at the moment, that's IP address).
url: meta.url
}
})
});

Describe the feature's behavior.

Two possible solutions are:

  • Set a default Content-Type header to 'application/json'
  • Make the headers customizable, allowing users to set their own headers, by passing trough an object like headers in the plugin.

Describe alternatives you've considered.

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant