How to send dynamic Json request to API using groovy script
can some one provide me sample snippet for to read dynamic json request to API using groovy script.
Also let me know is there any other way to automate dynamic Json requests apart from groovy script . below is my sample request.
{
"id": 65,
"name": "Test",
"displayName": "Test",
"description": "Test",
"status": "Active",
"updatedby": "Test",
"updatedon": "2020-08-13T00:00:00",
"rolePermission": {
"rolePermissionInfo": [
{
"name": "Test",
"permission": "Full Access",
"centername": "Test",
"displayname": "Test"
},
{
"name": "Test1",
"permission": "Full Access",
"centername": "Test1",
"displayname": "Test1"
},
{
"name": "Test1",
"permission": "Full Access",
"centername": "Test1",
"displayname": "Test1"
}
]
},
"mode": Test
}
Note : Role permission info has array of value and it will change dynamically.
You can refer below link to generate request dynamically.