fix: fixed issues around body mode conversion

This commit is contained in:
Anoop M D 2023-02-07 02:50:15 +05:30
parent 1110a4edda
commit 89b721d726
3 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ const jsonToBru = (json) => {
http: { http: {
method: _.lowerCase(_.get(json, 'request.method')), method: _.lowerCase(_.get(json, 'request.method')),
url: _.get(json, 'request.url'), url: _.get(json, 'request.url'),
mode: _.get(json, 'request.body.mode', 'none') body: _.get(json, 'request.body.mode', 'none')
}, },
query: _.get(json, 'request.params', []), query: _.get(json, 'request.params', []),
headers: _.get(json, 'request.headers', []), headers: _.get(json, 'request.headers', []),

View File

@ -75,7 +75,7 @@ const migrateLegacyBruFile = async (bruContent, pathname) => {
http: { http: {
method: _.lowerCase(_.get(json, 'request.method')), method: _.lowerCase(_.get(json, 'request.method')),
url: _.get(json, 'request.url'), url: _.get(json, 'request.url'),
mode: _.get(json, 'request.body.mode', 'none') body: _.get(json, 'request.body.mode', 'none')
}, },
query: _.get(json, 'request.params', []), query: _.get(json, 'request.params', []),
headers: _.get(json, 'request.headers', []), headers: _.get(json, 'request.headers', []),

View File

@ -42,9 +42,9 @@ const jsonToBru = (json) => {
bru += `${http.method} { bru += `${http.method} {
url: ${http.url}`; url: ${http.url}`;
if(http.mode && http.mode.length) { if(http.body && http.body.length) {
bru += ` bru += `
body: ${http.mode}`; body: ${http.body}`;
} }
bru += ` bru += `