Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
Here’s an outline with best practices for making your inquiry.
My question:
How can we generate 3 different records in the response body of GET request ?
Details (like screenshots):
I’m trying to send a Get request using mock server. Lets say im sending /user/userdata Get request and i have added an example to this request and have set the status as 200 OK.
[{
“Id”: {{$randomInt}},
“CustomerId”: {{$randomInt}},
“FirstName”: {{$randomNamePrefix}},
“LastName”: {{$randomNameSuffix}},
“EmailID”: {{$randomEmail}},
“MobNumber”: {{$randomPhoneNumber}}
}]
I will get
[{
“Id”: 456,
“CustomerId”: 23,
“FirstName”: Max,
“LastName”: Black,
“EmailID”: Max.Black@123.com,
“MobNumber”: 12345789
}]
What should i do to get
[{
“Id”: 456,
“CustomerId”: 23,
“FirstName”: Max,
“LastName”: Black,
“EmailID”: Max.Black@123.com,
“MobNumber”: 12345789
},
{
“Id”: 234,
“CustomerId”: 233,
“FirstName”: Maxie,
“LastName”: McBlack,
“EmailID”: Max.Black22@123.com,
“MobNumber”: 1123457839
},
{
“Id”: 123,
“CustomerId”: 23,
“FirstName”: Maxxre,
“LastName”: Gold,
“EmailID”: Maximum.Black@123.com,
“MobNumber”: 1234500789
}
]
How I found the problem:
I’ve already tried: