I’m sending a POST request via XMLHttpRequest with data entered into an HTML form. The form without interference of JavaScript would submit its data encoded as
XMLHttpRequest
You could use URLSearchParams
const queryString = new URLSearchParams(new FormData(myForm)).toString()