Is it possible to avoid the asynchronous retrieval in mendix client api at all? This will avoid thousands of headaches...
For example it is possible in jquery (the main thing is the async:false)
$.ajax(
{
type: "POST",
async: false,
url: url,
headers:headers,
data: JSON.stringify(
body
),
success: function(data){
retval=data;
},
error: function(){
console.log('fail');
},
dataType: 'json'
}
);