Given a json
string:
POST localhost:8080/person
{
f_name : 'Juan',
l_name : 'Dela Cruz'
}
we would usually return a boolean true
value upon success so that apigility would return/render something like this:
200 Ok
{
f_name : 'Juan',
l_name : 'Dela Cruz'
}
How can I also include the id
of the newly created entity in the resulting response? It may look something like this:
200 Ok
{
id : 1,
f_name : 'Juan',
l_name : 'Dela Cruz'
}
Any help/lead is highly appreciated.