Fix/example naming (#6002)

* fix: example naming

* fix: request not being saved when initialized with empty url

* remove check for method

* fix: improve the logic for get initial name

* fix test
This commit is contained in:
sanish chirayath
2025-11-05 22:56:03 +05:30
committed by GitHub
parent 7b183887ce
commit f3cb0d4bae
5 changed files with 35 additions and 53 deletions

View File

@@ -44,14 +44,9 @@ const jsonToExampleBru = (json) => {
// Request block
bru += '\nrequest: {\n';
if (url) {
bru += ` url: ${url}\n`;
}
bru += ` url: ${url}\n`;
// Add method field right after url
if (method) {
bru += ` method: ${method}\n`;
}
bru += ` method: ${method}\n`;
// Add mode field inside request block, right after method
if (request && request.body && request.body.mode) {