From 99b3b342843ac498ea151381164141107f3841bf Mon Sep 17 00:00:00 2001 From: "2206069183@qq.com" <2206069183@qq.com> Date: Wed, 17 Apr 2024 11:10:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A8=E5=B1=80=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4=E8=A6=86=E7=9B=96requeset=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 2206069183@qq.com <2206069183@qq.com> --- .../src/main/ets/components/imageknife/RequestOption.ets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/src/main/ets/components/imageknife/RequestOption.ets b/library/src/main/ets/components/imageknife/RequestOption.ets index 3d2c610..63deff9 100644 --- a/library/src/main/ets/components/imageknife/RequestOption.ets +++ b/library/src/main/ets/components/imageknife/RequestOption.ets @@ -93,7 +93,11 @@ export class RequestOption { // 全局调用header对应的方法,包含RequestOption的形式 addHeaderMap(map: Map) { - this.headers = map; + map.forEach((value, key) => { + if (!this.headers.has(key)) { + this.addHeader(key, value); + } + }) } // 优先级