I have a problem with my post request in javascript.
I have the following code for sending the post request
var xhttp = new XMLHttpRequest();
You need to convert the username parameter into a URI safe string, using xhttp.send("username="+encodeURIComponent(username));
username
xhttp.send("username="+encodeURIComponent(username));