Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Nov 2, 2024
2 parents a94a63d + cbb7e4d commit b7d5af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const instance = axios.create({
const tokenDomains = ['api.locyanfrp.cn', 'api-v2.locyanfrp.cn', 'localhost']

// post请求的时候,我们需要加上一个请求头,所以可以在这里进行一个默认的设置,即设置post的请求头为
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.headers.post['Content-Type'] = 'multipart/form-data;charset=UTF-8'
// 添加请求拦截器
instance.interceptors.request.use(
async (config) => {
Expand Down

0 comments on commit b7d5af2

Please sign in to comment.