From 0280726d59c8572908fed243f98b7ba69a229ec9 Mon Sep 17 00:00:00 2001 From: yangsy Date: Thu, 6 Nov 2025 13:42:33 +0800 Subject: [PATCH] chore: request - in post method reqConfig should override default headers --- src/utils/request.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 6f46eda..255167c 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -73,7 +73,7 @@ export class Request { const { retRaw, upload, ...reqConfig } = option ?? {}; return new Promise((resolve) => { this.instance - .post(url, data, { ...reqConfig, headers: { 'content-type': upload ? 'multipart/form-data' : 'application/json' } }) + .post(url, data, { headers: { 'content-type': upload ? 'multipart/form-data' : 'application/json' }, ...reqConfig }) .then((res) => { const resData = res.data; if (retRaw) {