Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82538

Pass complex parameters to a Mendix REST service

$
0
0

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:

  1. 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?

  2. 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!!


Viewing all articles
Browse latest Browse all 82538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>