Issue in sending request object in Rest call

0
Hi, I am calling a rest service from Mendix modeller(version 7.0.9) I am passing Json Structure in Rest call activity(Post operation) as below: {{ "dtls1":{{ "totalOneObligor": "10", "flatObligo": "22" }}, "dtls2":{{ "partyId": 35, "Name": "ROAV", "TypeId": "Personme", "firstCreditDate": "6-MAR-18", "lastCreditDate": "12-MAR-18" }},     "dtls3": {{                     "userId": "12345", "userRole": "OFFICER"                 }} }}   But in the request if i debug, only one at the top of request(in this case dtls1) is getting value while sending request. not others. Can any one know what is wrong in this request object? Thanks in advance!
asked
3 answers
1

Think you are passing al the json into the template field of the Call REST Request tab? Try to add a parameter with the json i provided (with single quiotes around it). Then add the parameter to the template field. Like this:

answered
1

You can do that just the normal way you would do this in a variable or any place else. See my example below. Make sure you have an object or variable with the value you want to use.

answered
0

Maybe it has something to do with your JSON? Why all the double {{ and }}? Shouldn't your json look something like 

{
    "dtls1": {
        "totalOneObligor": "10",
        "flatObligo": "22"
    },
    
    "dtls2": {
        "partyId": 35,
        "Name": "ROAV",
        "TypeId": "Personme",
        "firstCreditDate": "6-MAR-18",
        "lastCreditDate": "12-MAR-18"
    },
    "dtls3": {
        "userId": "12345",
        "userRole": "OFFICER"
    }
}

 

answered