Trying to use loopback framework for simulating a backend service. I need to retrieve an object using POST
method. I know REST services typically allow POST
to update/create a resource, but here, I cannot use GET
with resource details for retrieving data.
In my case, POST
data contains a few query fields that have to be used to query an object and send json back. Is this possible with loopback? I cannot use GET
with query parms due to security restrictions with sending data as query parms in a GET
URL.
here is post request data
[ { customer:"sam", city:"noWhere", } ]
the POST
event should query by customer and city, then return matching customer object
[ { customer:"sam", postcode:"352345", city:"noWhere", country:"US" } ]