How to send data in ‘GET’ request of XMLHttpRequest in javascript?

and thanks for investing your time in this post.

I want to send a data in GET request in 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 tried to make change on open function params like xhttp.open(“GET”, url, [false,data]);

but still getting no result