m00.k
m00.k2mo ago

preprocessor http post data check

When the preprocessor receives an http request, the params and query are checked, but is it possible to make the data values coming in post available as well? I even tried modifying the preprocessors using https://www.windmill.dev/docs/core_concepts/preprocessors as a reference, but I couldn't pass the post data to the input.
Preprocessors | Windmill
Scripts and flows can include a preprocessor to transform incoming requests before they are passed to the runnable.
No description
3 Replies
m00.k
m00.kOP2mo ago
I made this modification to the code in the default preprocessor and tested it, but it didn't work.
Hugo
Hugo2mo ago
the data is passed top level so you can just add the args you expect along side wm_trigger you can also request all the data to be wrapped inside a single "body" arg by adding ?wrap_body=true at the end of the URL (we will soon make it a configurable option instead of a query arg for http custom routes)
m00.k
m00.kOP2mo ago
Thanks for your reply. Taking a cue from what you said, I wrote the code like this and was able to receive and pass the body.
No description

Did you find this page helpful?