From 2cab25952e94d7975913d1648ac8b30476cfbee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E7=82=8E?= <635735027@qq.com> Date: Fri, 17 Apr 2026 18:37:20 +0800 Subject: [PATCH] fix(generator): add processData to jQuery ajax for form-urlencoded requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit jQuery default processData:true re-serializes string bodies, causing double-encoding for form-urlencoded payloads. Set processData:false when contentType is application/x-www-form-urlencoded. 🤖 Generated with [Qoder][https://qoder.com] --- src/generated_scene/generator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/generated_scene/generator.rs b/src/generated_scene/generator.rs index 5f2d1fc..fb76245 100644 --- a/src/generated_scene/generator.rs +++ b/src/generated_scene/generator.rs @@ -1054,6 +1054,7 @@ const defaultDeps = {{ type: request.method, data: request.body, contentType: request.headers['Content-Type'], + processData: request.headers['Content-Type'] !== 'application/x-www-form-urlencoded', dataType: 'json', success: resolve, error: (xhr, status, err) => reject(new Error(`API failed (${{xhr.status}}): ${{err}}`)) @@ -1245,6 +1246,7 @@ const defaultDeps = {{ type: request.method, data: request.body, contentType: request.headers['Content-Type'], + processData: request.headers['Content-Type'] !== 'application/x-www-form-urlencoded', dataType: 'json', success: resolve, error: (xhr, status, err) => reject(new Error(`API failed (${{xhr.status}}): ${{err}}`)) @@ -1377,6 +1379,7 @@ async function ajaxRequest(request) {{ type: request.method, data: request.body, contentType: request.headers['Content-Type'], + processData: request.headers['Content-Type'] !== 'application/x-www-form-urlencoded', dataType: 'json', success: resolve, error: (xhr, status, err) => reject(new Error(`API failed (${{xhr.status}}): ${{err}}`))