Commit 2f522aff by archer

perf: HTTP node jsonBody support \n

parent 36da8c86
...@@ -140,7 +140,8 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H ...@@ -140,7 +140,8 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
if (typeof val === 'string') { if (typeof val === 'string') {
if (isQuoted) { if (isQuoted) {
return val.replace(/(?<!\\)"/g, '\\"'); // Replace newlines with escaped newlines
return val.replace(/\n/g, '\\n').replace(/(?<!\\)"/g, '\\"');
} }
try { try {
JSON.parse(val); JSON.parse(val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment