You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
have one question regarding one thing which I am making in Postman. The situation next:
I have Post request with JSON:
{
"title":"TITLE", // It is just a name
"coordinate1":coordinate,
"coordinate2":coordinate
}
I would like to create new object with new random name when I do POST request.
I have created JS code to generate new name (Please look on it).
var randomString = randomString(7)
function randomString(len, charSet) {
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz,randomPoz+1);
}
return randomString;
}
But I did not get how use it ((. Which next steps should I make to getthe desired result? Should I set a variable env or someting else?
Thanks a lot.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
have one question regarding one thing which I am making in Postman. The situation next:
I have Post request with JSON:
{
"title":"TITLE", // It is just a name
"coordinate1":coordinate,
"coordinate2":coordinate
}
I would like to create new object with new random name when I do POST request.
I have created JS code to generate new name (Please look on it).
var randomString = randomString(7)
function randomString(len, charSet) {
charSet = charSet || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var randomString = '';
for (var i = 0; i < len; i++) {
var randomPoz = Math.floor(Math.random() * charSet.length);
randomString += charSet.substring(randomPoz,randomPoz+1);
}
return randomString;
}
But I did not get how use it ((. Which next steps should I make to getthe desired result? Should I set a variable env or someting else?
Thanks a lot.
The text was updated successfully, but these errors were encountered: