fix(#329): fixed basic auth header issue + added cli support for basic and bearer auth

This commit is contained in:
Anoop M D
2023-10-05 02:32:24 +05:30
parent 90fedc8ec6
commit 8d89496304
7 changed files with 44 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ const bruToJson = (bru) => {
request: {
method: _.upperCase(_.get(json, 'http.method')),
url: _.get(json, 'http.url'),
auth: _.get(json, 'auth', {}),
params: _.get(json, 'query', []),
headers: _.get(json, 'headers', []),
body: _.get(json, 'body', {}),
@@ -49,6 +50,7 @@ const bruToJson = (bru) => {
};
transformedJson.request.body.mode = _.get(json, 'http.body', 'none');
transformedJson.request.auth.mode = _.get(json, 'http.auth', 'none');
return transformedJson;
} catch (err) {