I’m doing a post request using axios in node.js.
The response is gzip data (behind, it’s a huge json)
My goal is to read the json file behind the res (gzip).
Currently, my request is:
await axios({
method: "post",
url: process.env.API_URL + "/collection",
headers: {
"Content-Type": "application/json",
"Accept-Encoding": "gzip, deflate, br",
},
data: {
project: req.body.project,
platform: req.body.platform,
},
decompress: true,
})
.then(async (response) => {
console.log(response.data)
}...
But I receive data like:
�1�����Q��:GR}��”-��}$K�ևҹ��°<ܖqw�Vmp�������Y!�����܋a�F�]� ���K%}0�
rЈ^�<��/�>
��Q���C7��R>�]§.,j�rg�6�MUVH��_Xq�����}|��a����$����K��cˠ��[�vv�����o�6�v�?~�����h���’Kn.��e��ZUW�;���ŗ��Ӹ6j%��M������Էʫ�c1��A�����.�t8�����Ș,����_��C�����۬���?q$@�CFq…
Does someone have any suggestion?
Thanks !