Open koliyo opened 1 week ago
It would be preferable if the cli and electron app use the same basic request processing. Right now there seem to be two implementations with different behavior.
// usebruno/bruno/packages/bruno-electron/src/ipc/network/prepare-request.js
let axiosRequest = {
mode: request.body.mode,
method: request.method,
url,
headers,
pathParams: request?.params?.filter((param) => param.type === 'path'),
responseType: 'arraybuffer'
};
vs
// usebruno/bruno/packages/bruno-cli/src/runner/prepare-request.js
let axiosRequest = {
method: request.method,
url: request.url,
headers: headers,
pathParams: request?.params?.filter((param) => param.type === 'path')
};
specifically the difference with responseType: 'arraybuffer'
Hey @koliyo,
Thanks for reporting this issue.
We’ve identified an inconsistency between the app and CLI. We're working on it.
I have checked the following:
Describe the bug
I see other issues referencing binary data in the bruno app, eg showing image in preview window, and downloading the response to file. But I am having issue with using binary data using bruno-cli in the response object. I have
res.body
which is of string type, and contains lots of UTF-8 Replacement Character instances.Am I missing something, or is there no way of getting the raw binary data from the response in
post-response
ortests
sections?.bru file to reproduce the bug
No response
Screenshots/Live demo link
this is using the cli runner