Tyler
Tyler
WWindmill
Created by Tyler on 5/5/2024 in #help
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,
) {
3 replies
WWindmill
Created by Tyler on 4/15/2024 in #help
Moving files around
Hello, I would like to move my scripts around, without breaking things. Does using post / get by hash only, protect against this?
3 replies