Anmoljain834
2 months agoNew Contributor
Dynamic Payload as per the Id Provided in params
I am working on a Backend Project, and also created multiple APIs.
In one of my API i want dynamic payload as per the id in the params provided & and i am not able to implement it,
example of the requirment
api/v1/acc/{1}
then payload should be
{
"name":"String"
}
if api/v1/acc/{2}
{
"age":"number"
}
the the request.body should change dynamiclly as per params id,
Soo can anyone help me with it,
Thanks in advance