apify-client-js
apify-client-js copied to clipboard
`serializeRequest` performs `JSON.stringify` on a `Buffer`
https://github.com/apify/apify-client-js/blob/5093b8f98425af8c829478e8df5aeee1d007c283/src/interceptors.ts#L34 https://github.com/apify/apify-client-js/blob/5093b8f98425af8c829478e8df5aeee1d007c283/src/interceptors.ts#L49-L50 https://github.com/apify/apify-client-js/blob/5093b8f98425af8c829478e8df5aeee1d007c283/src/interceptors.ts#L68-L72
I was wondering why I was receiving {"type":"Buffer","data":[...]} instead of actual data...
This breaks .call(buffer, { contentType: 'application/json' }).
Passing a string does not work either because axios does this:
https://github.com/axios/axios/blob/892c241773e7dda78a969ac1faa9b365e24f6cc8/lib/defaults/index.js#L119