mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-29 07:34:07 +00:00
fix: update stringifyHttpRequest to handle response body content correctly (#6488)
This commit is contained in:
@@ -189,9 +189,12 @@ const stringifyHttpRequest = (item: BrunoItem): string => {
|
||||
}
|
||||
|
||||
if (example.response.body && example.response.body.type && example.response.body.content !== undefined) {
|
||||
const content = example.response.body.content;
|
||||
const contentString = typeof content === 'string' ? content : JSON.stringify(content, null, 2);
|
||||
|
||||
ocExample.response.body = {
|
||||
type: example.response.body.type as 'json' | 'text' | 'xml' | 'html' | 'binary',
|
||||
data: String(example.response.body.content || '')
|
||||
data: contentString
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user