From 7110ee4527dbfa3b4eba35b3e1bf9e3e69b6c5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Fri, 11 Oct 2024 17:56:56 +0800 Subject: [PATCH] =?UTF-8?q?form=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BD=AC=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ets/http/HttpHelper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/ets/http/HttpHelper.ts b/src/main/ets/http/HttpHelper.ts index a824c19..80b548c 100644 --- a/src/main/ets/http/HttpHelper.ts +++ b/src/main/ets/http/HttpHelper.ts @@ -152,6 +152,7 @@ export class HttpHelper { ...params.headers } let data = this.getContent(params.data) + console.log('=====>', 'POSTForm:', params.url) console.log('=====>', 'POSTForm:', JSON.stringify(header)) console.log('=====>', 'POSTForm:', data) @@ -161,7 +162,7 @@ export class HttpHelper { connectTimeout: 20000, readTimeout: 20000, header: header, - extraData: data + extraData: encodeURI(data) }) .then((data: http.HttpResponse) => { console.info('=====>' + 'Result:' + data.result as string);