WindmillWWindmill
Powered by
TylerT
Windmill•2y ago•
2 replies
Tyler

Accepting raw body

I have webhooks submitting data that is not structured well.
Is it possible to just accept the entire POST body as a single variable?

Something like:
export async function main(hook: string) {}
export async function main(hook: string) {}


Example input:
event=lead_added
data[source]=widget
data[lead][last_name]=N/A
event=lead_added
data[source]=widget
data[lead][last_name]=N/A


When I run it, it says the input arguments are this, but I can't define these as the parameter names in the function, it's invalid javascript.

export async function main(
    'data[lead][last_name]': string,
    'data[source]': string,
    event: string,
) {
export async function main(
    'data[lead][last_name]': string,
    'data[source]': string,
    event: string,
) {
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

RAW App Stopped
fooosieeeFfooosieee / help
4w ago
Body of a preprocessor
LeandroLLeandro / help
11mo ago
Connection aborted with the large request body
goodhawkGgoodhawk / help
2y ago
Failed to deserialize form body on twilio POSTs to Windmill intake webhook
mindofbeholderMmindofbeholder / help
3y ago