Skip to content
Discussion options

You must be logged in to vote

Hi,

Yes, from what I've understood an empty value in a QP is a valid QP, so it will accept that.

Currently there is a hacky way (if your request has at least one query parameter per call). It uses an executable to do logic. Example in bash:

[Query]
$(bash -c 'if [ -n "$VAR" ]; then echo param=$VAR; else echo " "; fi')

You can use any language, as long as it can be invoked to eval a string and can access environment variables. Example in node:

[Query]
$(node -e 'if ( process.env.VAR !== undefined) { console.log("param="+process.env.VAR) } else { console.log(" ") };')

But it doesn't read too nicely, esp. the printing of an empty string to get around an executable needs to have some output. …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@on3iro
Comment options

Answer selected by on3iro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants