chore: request

- in post method reqConfig should override default headers
This commit is contained in:
yangsy
2025-11-06 13:42:33 +08:00
parent 85df036a6c
commit 0280726d59

View File

@@ -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) {