Inspired by your effort I found a way of adding the NULL char at the end:
It's not beautiful, but less hassle than going through base64 encoding
Use a pre-request Script in an other collection (as websocket collections doesn't yet support scripts) set a variable, eg NULL_CHAR. I use the same script to get a token too.
pm.environment.set('NULL_CHAR', '\0');
Run a request in the other collection to get the token and set the variables,
Use the token and variables in the messages, eg. Make sure you do not add a newline after NULL_CHAR
Hi, thank you for your tips.
Inspired by your effort I found a way of adding the NULL char at the end:
It's not beautiful, but less hassle than going through base64 encoding
For linux, setting
NULL_CHARas^@worked for me.pm.globals.set("NULL_CHAR",'^@')Nice!
So how to use
pm.globals.set("NULL_CHAR", '\0');with Websockets ? Somebody succeded it ?
Setting environment variable didn't work for me. I used global variables
pm.globals.set("NULL_CHAR", '\0');