const fd = new FormData();
fd.append('name1', 'value1');
fd.append('name2', 'value2');
fd.append('name3', new Blob([`zzzzzzzzzzzzzzzzz`]));
const xhr = new XMLHttpRequest();
xhr.open(`POST`, location.href);
xhr.send(fd);
in devtools network panel, request body string is
------WebKitFormBoundaryTUux0YL1tLSIGtnn
Content-Disposition: form-data; name="name1"
value1
------WebKitFormBoundaryTUux0YL1tLSIGtnn
Content-Disposition: form-data; name="name2"
value2
------WebKitFormBoundaryTUux0YL1tLSIGtnn
Content-Disposition: form-data; name="name3"; filename="blob"
Content-Type: application/octet-stream
zzzzzzzzzzzzzzzzz
------WebKitFormBoundaryTUux0YL1tLSIGtnn--

so How to convert FormData to request body string ?
const formDataToString = (fd: FormData): string => {
// TODO
return ``;
};