@requestly/requestly-proxy 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -66,7 +66,7 @@ const modify_request_using_code = (action, ctx) => __awaiter(void 0, void 0, voi
|
|
|
66
66
|
requestHeaders: ctx.clientToProxyRequest.headers,
|
|
67
67
|
};
|
|
68
68
|
try {
|
|
69
|
-
args.
|
|
69
|
+
args.bodyAsJson = JSON.parse(args.request);
|
|
70
70
|
}
|
|
71
71
|
catch (_a) {
|
|
72
72
|
/*Do nothing -- could not parse body as JSON */
|
|
@@ -80,7 +80,7 @@ const modify_request_using_code = (action, ctx) => __awaiter(void 0, void 0, voi
|
|
|
80
80
|
consoleCapture.stop();
|
|
81
81
|
const consoleLogs = consoleCapture.getCaptures();
|
|
82
82
|
ctx.rq.consoleLogs.push(...consoleLogs);
|
|
83
|
-
const isRequestJSON = !!args.
|
|
83
|
+
const isRequestJSON = !!args.bodyAsJson;
|
|
84
84
|
if (typeof finalRequest === "object" && isRequestJSON) {
|
|
85
85
|
finalRequest = JSON.stringify(finalRequest);
|
|
86
86
|
}
|