Thank you for taking the time to read this post.
I'm looking to send data in a GET request using XMLHttpRequest.
function useAjax(url,data){
const xhttp = new XMLHttpRequest();
xhttp.onload = function(e) {
const resData = JSON.parse(xhttp.responseText) ;
setResponseData(true,resData)
}
xhttp.open("GET", url, false);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send(data);
}
I attempted to modify the parameters in the open function like xhttp.open("GET", url, [false,data]);
However, I still did not see any results.