I'm trying to download report document from amazon SP API but couldn't figure out what should I do. Did everything they said in these link1 link2 link3 links and got same error from all these three.
error:
Error: incorrect header check
at Zlib.zlibOnError [as onerror] (node:zlib:189:17) {
errno: -3,
code: 'Z_DATA_ERROR'
}
Last tried code:
const res = await axios.get(
'mylink'
);
const payload = Buffer.from(res.data, 'base64');
const data = JSON.parse(pako.inflate(payload, { to: 'string' }));
console.log('first', data);