Sending Json Body in groovy script

Pradeep A July 15, 2021

{
"template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName":"My Sample Team",
"description":"My Sample Team’s Description",
"members":[
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"roles":[
"owner"
],
"user@odata.bind":"https://graph.microsoft.com/v1.0/users('56d0e712-f795-4374-ab9a-01bb6f5a5576')"
}
]
}

 

Hi I want to send this Json body to my API. How should I send this nested request body.

I have used HttpUrlConnection to access my API. And jsonBody.put("key":"value")

jason= variable. created as jsonBody=[ : ]  

0 answers

Suggest an answer

Log in or Sign up to answer