When env variable is null it sends nothing in request

Hi all,

I have a problem sending a variable that is null in the body of my request.
In pre-request script I set it:
pm.environment.set(“other”, null);
In my request body:
But when I send it looks like nothing:
{ “other”: }

What should I do in order to set “other” to null?

Would this work for what you are trying to do since postman uses strings and doesn’t know about null special meaning…:

pm.environment.set(“other”, “null”);

1 Like

Thank you! It works!