Leandro
Leandro4w ago

Body of a preprocessor

hi guys, i'm using a preprocessor in my flow that should get the body of the request and pass it to the preprocessor result so that i can use in the input of my flow. But the way i'm using, does'nt seem to work because the preprocessor doesn't get the body of the request.Why? Only query, params and others but not the body are in the top level Thank for your help
No description
No description
No description
No description
5 Replies
Hugo
Hugo4w ago
Hi, the body keys are passed alongside wm_trigger for instance if you're sending { "key1": ..., "key2": ... } you need to set as parameters of your preprocessor to (key1: any, key2: any, wm_trigger any) other option is to enable the Wrap body option on the http trigger which will make the whole body available at the "body" key so: (body: any, wm_trigger, any)
Leandro
LeandroOP4w ago
Hi,Thank you for your help Hugo! Have a nice week Hi @Hugo , hope you are doing well. If i want to put query param, should i follow the example that the AI gave me or set a parameter like it's done for the body? Thank u for support
Hugo
Hugo4w ago
you will find query parameters in wm_trigger.http.query
Hugo
Hugo4w ago
Custom HTTP routes | Windmill
Windmill supports custom HTTP routes to trigger runnables or serve static assets and websites.
Leandro
LeandroOP4w ago
Ty!

Did you find this page helpful?