How to send user data in json format to another server when user register on wordpress site in PHP
Sending and receiving data in JSON format using POST method xhr = new XMLHttpRequest(); var url = “url”; xhr.open(“POST”, url, true); xhr.setRequestHeader(“Content-type”, “application/json”); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) { var json = JSON.parse(xhr.responseText); console.log(json.email + “, ” + json.password) } } var data = JSON.stringify({“email”:”[email protected]”,”password”:”101010″}); xhr.send(data); Sending … Read more