Skip to content

Commit 768e087

Browse files
committed
chore: added bodyAsJson in requestBody rule
1 parent 9fab937 commit 768e087

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/proxy-middleware/rule_action_processor/processors/modify_request_processor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const modify_request_using_code = async (action, ctx) => {
7171
};
7272

7373
try {
74-
args.requestJSON = JSON.parse(args.request);
74+
args.bodyAsJson = JSON.parse(args.request);
7575
} catch {
7676
/*Do nothing -- could not parse body as JSON */
7777
}
@@ -90,7 +90,7 @@ const modify_request_using_code = async (action, ctx) => {
9090

9191
ctx.rq.consoleLogs.push(...consoleLogs)
9292

93-
const isRequestJSON = !!args.requestJSON;
93+
const isRequestJSON = !!args.bodyAsJson;
9494
if (typeof finalRequest === "object" && isRequestJSON) {
9595
finalRequest = JSON.stringify(finalRequest);
9696
}

0 commit comments

Comments
 (0)