How to send an asynchronous request for Update / Delete, using the usual library of Java Script? In the internet I see jQuery, etc., but during my task I need a solution in pure JS.
1 answer
Like that:
var r = new XMLHttpRequest(); //PUT GET DELETE POST r.open("POST", "webservice", true); r.onreadystatechange = function () { if (r.readyState != 4 || r.status != 200) return; console.log(r.responseText); }; r.send("a=1&b=2&c=3"); - I asked about "Put" and "Delete" .. - Maks.Burkov
- Try instead of "POST" PUT, but there add. configs are needed, and PUT is blocked in the initial settings of the Apache (if to php connection) - user190134
- @ Maks.Burkov added comment - AkaInq
- What configs are needed? Connect to Java .. - Maks.Burkov
|