Hi all,
I've configured a published REST service in my project that accepts data from the consumer using POST and writes to the database. So, far I am able to accept primitive parameters by means of a transient object with corresponding attributes. However, I wish to pass an object (such as JSON payload) as a parameter to the service.
I'd like to know two things, if possible:
How do I setup my data model to receive both kinds of parameters? Is it as simple as creating an object and associating it with the entity that has the primitive parameters?
On the consumer end, how might I pass both primitive and complex parameters to the REST service from JS? The service is being invoked via URL, but how do I place the complex parameter on the URL? I'm aware of the AJAX jquery function's 'data' attribute that can be used to pass values to the service. But this ultimately still results in the values being passed as URL parameters.
Any help I can get on this would be greatly appreciated guys!!