If you are making a data request, you should use a GET request. Any parameters necessary to obtain the correct data must be passed in the query string:
var url = 'http://localhost:8081/inlinetrans?key1=value1&key2=value2...';
client.open("GET", url, true);
client.send(null);
If on the other hand you want to send data to the server, you should use the POST request:
var data = ....
client.open("POST", url, true);
client.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
client.setRequestHeader("Connection", "close");
client.send("data=" + encodeURIComponent(data));
data JSON. , API . , .