How to download zipfile from response sent as a octet-stream from browser?

I’m trying to download zip file sent after i make an api call, my request header is accept: application/octate-stream, response header is same.

 const downloadedResponse = new Blob([response],{type:'application/octate-stream'})
 const data = URL.createObjectURL(downloadedResponse);
 const a = document.createElement("a");
 a.style = "display: none";
 a.href = data;
 a.download = fileName;
 document.body.appendChild(a);
 a.click();

It downloads the file but i can’t unzip and the response has some weird characters. What am i doing wrong? How can i fix it? Thank you in advance.