How can I sent pre-request script in API

Hello @George ,

I want to sent pre-request script with API .
How can I use this collection with wappler API ?
please guide me
( )

This will not help, not even sure that it is related to your problem, but here goes.

According to the meistros, this is pre-request:

Pre-request scripts are snippets of code associated with a collection request that are executed before the request is sent. This is perfect for use-cases like including the timestamp in the request headers or sending a random alphanumeric string in the URL parameters.

I need a random string to populate the idempotency_key as a post value for my API. I set a value and used that as the value. Alas, this did not work.

Not sure if the code in Set Value is wrong, or the whole concept of how I am going about it is wrong. Will keep working on it.

Edit: Changed the value and all is well