I am just trying (with 5.x) to do a very simple AJAX POST, using the example JavaScript ‘AjaxPost’.
I have changed the button click method to
btnAjax.onclick = function() {
var params = {}
req = Ajax(“http://localhost:8080/servoy-service/velocity/StaffHR/api_timesheet/”, “PUT”, “PayrollNo=123”, done);
};
but my page is returning ‘undefined’ (I have also tried GET & POST)
[My page is using something called Velocity in a product called Servoy to do REST web services]
Using another program
https://mmattozzi.github.io/cocoa-rest-client/
I am able to get my page to get the parameter(s) passed in the BODY (see attached screen shot…very bottom is my Servoy console output of what the page returns as sent
How can I make the AJAX call send multiple parameters in the BODY using PUT??