chore: request
- in post method reqConfig should override default headers
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user