From 87c8934c45cac61968e5993d4c72bbd384f8932b Mon Sep 17 00:00:00 2001 From: Sanjai Kumar <161328623+sanjaikumar-bruno@users.noreply.github.com> Date: Tue, 23 Dec 2025 15:48:52 +0530 Subject: [PATCH] fix: update stringifyHttpRequest to handle response body content correctly (#6488) --- .../src/formats/yml/items/stringifyHttpRequest.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts b/packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts index eced35b2c..99c122e96 100644 --- a/packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts +++ b/packages/bruno-filestore/src/formats/yml/items/stringifyHttpRequest.ts @@ -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 }; } }