|
@@ -5,7 +5,7 @@ import { config } from './config'
|
|
|
const { default_headers } = config
|
|
|
|
|
|
const request = (option) => {
|
|
|
- const { url, method, params, data, headersType, responseType, ...config } = option
|
|
|
+ const { url, method, params, data, headersType, responseType, headers, ...config } = option
|
|
|
return service({
|
|
|
url: url,
|
|
|
method,
|
|
@@ -14,6 +14,7 @@ const request = (option) => {
|
|
|
...config,
|
|
|
responseType: responseType,
|
|
|
headers: {
|
|
|
+ ...headers,
|
|
|
'Content-Type': headersType || default_headers
|
|
|
}
|
|
|
})
|