Would it be useful if #curl provided a default random variable?

Exploring this little idea here. Good? Bad?

github.com/curl/curl/pull/1381…

#curl
in reply to daniel:// stenberg://

I think that there either should be proper variable support a la Postman or other tools, or none at all.

Like, the next thing a user would probably want is to use two _different_ random variables (so no "holds fixed content"), but use both twice (so just returning different values each time won't satisfy this either).

Or a user (assuming the same HTTP API testing use case) would probably want to preserve these values in a sort-of session - to send several requests with the same random user id, for example.

in reply to daniel:// stenberg://

oof, sorry, should've read the man page before posting. In my defense, curl does _a lot_ of thing, and I don't know most of it.

I would still argue against the "holds fixed content" part - as far as I understood, you will be able to do --variable 'id={{random}}' to achieve that, and supporting several different random values in a request is still a useful thing.

in reply to daniel:// stenberg://

@tokudan In the test cases, I use a url query param for request id using url globbing. That works fine in a test server, as it only has one client.

To correlate against a real server, you‘d need a more unique id, as it may serve many clients, either parallel or over time. (for parallel, timestamps in logs are of little help)

The proposed random would help when used together with the XFER_ID to make a likely globally unique request id.