diff --git a/packages/bruno-electron/src/bru/index.js b/packages/bruno-electron/src/bru/index.js index bee248e22..ebbccb90c 100644 --- a/packages/bruno-electron/src/bru/index.js +++ b/packages/bruno-electron/src/bru/index.js @@ -107,7 +107,7 @@ const jsonToBru = (json) => { http: { method: _.lowerCase(_.get(json, 'request.method')), url: _.get(json, 'request.url'), - mode: _.get(json, 'request.body.mode', 'none') + body: _.get(json, 'request.body.mode', 'none') }, query: _.get(json, 'request.params', []), headers: _.get(json, 'request.headers', []), diff --git a/packages/bruno-electron/src/bru/migrate.js b/packages/bruno-electron/src/bru/migrate.js index 88a78f71e..b98ccf9c5 100644 --- a/packages/bruno-electron/src/bru/migrate.js +++ b/packages/bruno-electron/src/bru/migrate.js @@ -75,7 +75,7 @@ const migrateLegacyBruFile = async (bruContent, pathname) => { http: { method: _.lowerCase(_.get(json, 'request.method')), url: _.get(json, 'request.url'), - mode: _.get(json, 'request.body.mode', 'none') + body: _.get(json, 'request.body.mode', 'none') }, query: _.get(json, 'request.params', []), headers: _.get(json, 'request.headers', []), diff --git a/packages/bruno-lang/v2/src/jsonToBru.js b/packages/bruno-lang/v2/src/jsonToBru.js index fec91d175..9d56fa7e2 100644 --- a/packages/bruno-lang/v2/src/jsonToBru.js +++ b/packages/bruno-lang/v2/src/jsonToBru.js @@ -42,9 +42,9 @@ const jsonToBru = (json) => { bru += `${http.method} { url: ${http.url}`; - if(http.mode && http.mode.length) { + if(http.body && http.body.length) { bru += ` - body: ${http.mode}`; + body: ${http.body}`; } bru += `