Closed folklorelabs closed 3 weeks ago
Hi -- I'm running into an issue with downloadFileAllTranslations. The return value appears to be always be corrupt. After some digging I found that the function is hard-coded to return the response as a string via response.text() (https://github.com/Smartling/api-sdk-nodejs/blob/master/api/base/index.ts#L138).
downloadFileAllTranslations
response.text()
I believe this should instead return the actual raw response, or at minimum response.buffer so that it is not lossy. I got it working locally by returning response.arrayBuffer() instead and submitted a PR with these changes.
response.arrayBuffer()
Fixed with https://github.com/Smartling/api-sdk-nodejs/pull/115
Hi -- I'm running into an issue with
downloadFileAllTranslations
. The return value appears to be always be corrupt. After some digging I found that the function is hard-coded to return the response as a string viaresponse.text()
(https://github.com/Smartling/api-sdk-nodejs/blob/master/api/base/index.ts#L138).I believe this should instead return the actual raw response, or at minimum response.buffer so that it is not lossy. I got it working locally by returning
response.arrayBuffer()
instead and submitted a PR with these changes.